tcpecho_raw: fix bogus pbuf_free on error

This commit is contained in:
Simon Goldschmidt 2019-01-30 14:20:16 +01:00
parent 4c19a909c2
commit 3e59b224fa

View File

@ -212,9 +212,7 @@ tcpecho_raw_recv(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err)
ret_err = ERR_OK;
} else if(err != ERR_OK) {
/* cleanup, for unknown reason */
if (p != NULL) {
pbuf_free(p);
}
LWIP_ASSERT("no pbuf expected here", p == NULL);
ret_err = err;
}
else if(es->state == ES_ACCEPTED) {