|
From: | address@hidden |
Subject: | Re: [lwip-users] Bug in ST-provided packet-pump ST32F4xxx ethernetif.c ?? |
Date: | Wed, 20 Mar 2019 09:15:59 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 |
Hi Dave, Am 19.03.2019 um 23:09 schrieb Dave Nadler:
[..] // DRN: below calls LwIP tcpip_input, which calls tcpip_inpkt, who enqueues msg with pointer p into sys_mbox_t tcpip_mbox if (netif->input( p, netif) != ERR_OK ) { pbuf_free(p); // DRN: Serious bug! p is placed in mailbox by netif->input and may not yet have been processed!
No bug: the pbuf is put into the queue if ERR_OK is returned only. If an error is returned, the queue was full so the pbuf must be freed here. Regards, Simon
} } } while(p!=NULL); } } }
[Prev in Thread] | Current Thread | [Next in Thread] |