Fix netconn access after it was freed in lwiperf - found by Coverity

This commit is contained in:
Dirk Ziegelmeier 2016-02-19 23:26:06 +01:00
parent ea94549cb2
commit bbb5e99f25

View File

@ -518,6 +518,7 @@ lwiperf_tcp_poll(void *arg, struct tcp_pcb *tpcb)
LWIP_UNUSED_ARG(tpcb);
if (++conn->poll_count >= LWIPERF_TCP_MAX_IDLE_SEC) {
lwiperf_tcp_close(conn, LWIPERF_TCP_ABORTED_LOCAL);
return ERR_OK; /* lwiperf_tcp_close frees conn */
}
if (!conn->base.server) {