From 10edba936b4086685e7382a6257d6a2e0f01ae84 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Fri, 19 Feb 2016 23:28:09 +0100 Subject: [PATCH] Fix tcp pcb access after it was freed in tcp.c - found by Coverity --- src/core/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/tcp.c b/src/core/tcp.c index 362b7e60..c6f0cb52 100644 --- a/src/core/tcp.c +++ b/src/core/tcp.c @@ -611,7 +611,7 @@ tcp_listen_dual_with_backlog(struct tcp_pcb *pcb, u8_t backlog) lpcb = tcp_listen_with_backlog(pcb, backlog); if ((lpcb != NULL) && - ip_addr_isany(&pcb->local_ip)) { + ip_addr_isany(&lpcb->local_ip)) { /* The default behavior is to accept connections on either * IPv4 or IPv6, if not bound. */ /* @see NETCONN_FLAG_IPV6_V6ONLY for changing this behavior */