From 3e59b224faed26a86b6ed7bbb4af82b6282a21c1 Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Wed, 30 Jan 2019 14:20:16 +0100 Subject: [PATCH] tcpecho_raw: fix bogus pbuf_free on error --- contrib/apps/tcpecho_raw/tcpecho_raw.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/contrib/apps/tcpecho_raw/tcpecho_raw.c b/contrib/apps/tcpecho_raw/tcpecho_raw.c index 752d7ebf..016a7031 100644 --- a/contrib/apps/tcpecho_raw/tcpecho_raw.c +++ b/contrib/apps/tcpecho_raw/tcpecho_raw.c @@ -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) {