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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Reference in a new issue