Merged in seanshpark/nuttx_arch/stm32net (pull request #6)

STM32: Fix eth mem leak in recvframe
This commit is contained in:
Gregory Nutt 2015-08-19 07:49:30 -06:00
commit 098f1035fc

View File

@ -1670,6 +1670,16 @@ static void stm32_receive(FAR struct stm32_ethmac_s *priv)
if (dev->d_len > CONFIG_NET_ETH_MTU)
{
nlldbg("DROPPED: Too big: %d\n", dev->d_len);
/* free dropped packet buffer */
if (dev->d_buf)
{
nllvdbg("! dev->d_buf not NULL, %p / %d\n",
dev->d_buf, dev->d_len );
stm32_freebuffer(priv, dev->d_buf);
dev->d_buf = NULL;
dev->d_len = 0;
}
continue;
}