mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-09-13 02:05:43 +00:00
Fix netconn access after it was freed in lwiperf - found by Coverity
This commit is contained in:
parent
ea94549cb2
commit
bbb5e99f25
@ -518,6 +518,7 @@ lwiperf_tcp_poll(void *arg, struct tcp_pcb *tpcb)
|
|||||||
LWIP_UNUSED_ARG(tpcb);
|
LWIP_UNUSED_ARG(tpcb);
|
||||||
if (++conn->poll_count >= LWIPERF_TCP_MAX_IDLE_SEC) {
|
if (++conn->poll_count >= LWIPERF_TCP_MAX_IDLE_SEC) {
|
||||||
lwiperf_tcp_close(conn, LWIPERF_TCP_ABORTED_LOCAL);
|
lwiperf_tcp_close(conn, LWIPERF_TCP_ABORTED_LOCAL);
|
||||||
|
return ERR_OK; /* lwiperf_tcp_close frees conn */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!conn->base.server) {
|
if (!conn->base.server) {
|
||||||
|
Loading…
Reference in New Issue
Block a user