From 1c018caefe025206c9fa63464396f6177283b723 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Sun, 22 Nov 2009 15:42:30 +0000 Subject: [PATCH] move tcp_debug_print_state to prevent accessing pcb when it might already be deallocated due to recv_flags == TF_RESET or TF_CLOSED --- src/core/tcp_in.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c index aa3f9f61..9335c483 100644 --- a/src/core/tcp_in.c +++ b/src/core/tcp_in.c @@ -341,12 +341,12 @@ tcp_input(struct pbuf *p, struct netif *inp) if (err == ERR_OK) { tcp_output(pcb); } - } #if TCP_INPUT_DEBUG #if TCP_DEBUG - tcp_debug_print_state(pcb->state); + tcp_debug_print_state(pcb->state); #endif /* TCP_DEBUG */ #endif /* TCP_INPUT_DEBUG */ + } }