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:
parent
8e703b14ee
commit
da8835aa0b
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue