net/tcp: reset the connection ref count before tcp_free()

reset the connection refcount if SYN retry count has elapsed

Assertion:

up_assert: Assertion failed at file:tcp/tcp_conn.c line: 764 task: netdev_wq

N/A

Change-Id: I3b0966af52a9dc52d459e8b5aa7d478955d6691f
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an
2021-01-28 19:47:14 +08:00
parent 1f41e8bc0b
commit 673526fc74
+1
View File
@@ -270,6 +270,7 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
/* Finally, we must free this TCP connection structure */
conn->crefs = 0;
tcp_free(conn);
goto done;
}