From eae9798276a55b2f1bd4a65eb988eab2a2c987e8 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Sat, 20 Feb 2010 17:27:08 +0000 Subject: [PATCH] Fixed pcb leak when accept-callback is NULL and asserts are disabled --- src/include/lwip/tcp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/lwip/tcp.h b/src/include/lwip/tcp.h index 78e6d984..4ec59fc5 100644 --- a/src/include/lwip/tcp.h +++ b/src/include/lwip/tcp.h @@ -511,7 +511,7 @@ err_t lwip_tcp_event(void *arg, struct tcp_pcb *pcb, do { \ if((pcb)->accept != NULL) \ (ret) = (pcb)->accept((pcb)->callback_arg,(pcb),(err)); \ - else (ret) = ERR_OK; \ + else (ret) = ERR_ARG; \ } while (0) #define TCP_EVENT_SENT(pcb,space,ret) \