ethernetif: fix potential memory leak

1. If L2_TO_L3_RX_BUF_MODE is not selected, we must assign l2_owner explictly before we call pbuf_free.
This commit is contained in:
morris 2018-11-06 19:10:01 +08:00
parent 8e703b14ee
commit da8835aa0b

View file

@ -196,7 +196,6 @@ if (netif->input(p, netif) != ERR_OK) {
/* full packet send to tcpip_thread to process */
if (netif->input(p, netif) != ERR_OK) {
LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_input: IP input error\n"));
p->l2_owner = NULL;
pbuf_free(p);
}
#endif