mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-02 14:58:22 +00:00
tcp_input: move tcp_debug_print_state to prevent accessing pcb when it might already be deallocated due to calling tcp_abort in tcp_process.
This commit is contained in:
parent
b30c6f8b9e
commit
98a58f9e67
@ -342,6 +342,11 @@ tcp_input(struct pbuf *p, struct netif *inp)
|
||||
tcp_output(pcb);
|
||||
}
|
||||
}
|
||||
#if TCP_INPUT_DEBUG
|
||||
#if TCP_DEBUG
|
||||
tcp_debug_print_state(pcb->state);
|
||||
#endif /* TCP_DEBUG */
|
||||
#endif /* TCP_INPUT_DEBUG */
|
||||
}
|
||||
|
||||
|
||||
@ -351,12 +356,6 @@ tcp_input(struct pbuf *p, struct netif *inp)
|
||||
pbuf_free(inseg.p);
|
||||
inseg.p = NULL;
|
||||
}
|
||||
#if TCP_INPUT_DEBUG
|
||||
#if TCP_DEBUG
|
||||
tcp_debug_print_state(pcb->state);
|
||||
#endif /* TCP_DEBUG */
|
||||
#endif /* TCP_INPUT_DEBUG */
|
||||
|
||||
} else {
|
||||
|
||||
/* If no matching PCB was found, send a TCP RST (reset) to the
|
||||
|
Loading…
Reference in New Issue
Block a user