mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-06 09:56:38 +00:00
tcpip_input()/tcpip_ethinput(): don't free the pbuf if returning ERR_MEM, that is the netif driver's responsibility
This commit is contained in:
parent
75f7f21eb0
commit
5e9d80fbdb
@ -255,7 +255,6 @@ tcpip_input(struct pbuf *p, struct netif *inp)
|
||||
if (mbox != SYS_MBOX_NULL) {
|
||||
msg = memp_malloc(MEMP_TCPIP_MSG);
|
||||
if (msg == NULL) {
|
||||
pbuf_free(p);
|
||||
return ERR_MEM;
|
||||
}
|
||||
|
||||
@ -278,7 +277,6 @@ tcpip_ethinput(struct pbuf *p, struct netif *inp)
|
||||
if (mbox != SYS_MBOX_NULL) {
|
||||
msg = memp_malloc(MEMP_TCPIP_MSG);
|
||||
if (msg == NULL) {
|
||||
pbuf_free(p);
|
||||
return ERR_MEM;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user