tcp: fix coverity warning for tcp_timer
use after free when the number of retransmissions reached the maximum. Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
parent
c3ccc30f83
commit
1389a686ba
@ -553,7 +553,7 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn)
|
||||
|
||||
conn->crefs = 0;
|
||||
tcp_free(conn);
|
||||
goto done;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Otherwise, check for a timeout on an established connection.
|
||||
|
Loading…
Reference in New Issue
Block a user