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:
goldsimon 2007-05-17 09:04:36 +00:00
parent 75f7f21eb0
commit 5e9d80fbdb

View File

@ -255,7 +255,6 @@ tcpip_input(struct pbuf *p, struct netif *inp)
if (mbox != SYS_MBOX_NULL) { if (mbox != SYS_MBOX_NULL) {
msg = memp_malloc(MEMP_TCPIP_MSG); msg = memp_malloc(MEMP_TCPIP_MSG);
if (msg == NULL) { if (msg == NULL) {
pbuf_free(p);
return ERR_MEM; return ERR_MEM;
} }
@ -278,7 +277,6 @@ tcpip_ethinput(struct pbuf *p, struct netif *inp)
if (mbox != SYS_MBOX_NULL) { if (mbox != SYS_MBOX_NULL) {
msg = memp_malloc(MEMP_TCPIP_MSG); msg = memp_malloc(MEMP_TCPIP_MSG);
if (msg == NULL) { if (msg == NULL) {
pbuf_free(p);
return ERR_MEM; return ERR_MEM;
} }