From e03218ab716c99f335761f8f583eab6f9a181a99 Mon Sep 17 00:00:00 2001 From: "chao.an" Date: Thu, 28 Jan 2021 19:47:14 +0800 Subject: [PATCH] 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 Signed-off-by: chao.an --- net/tcp/tcp_timer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/tcp/tcp_timer.c b/net/tcp/tcp_timer.c index e769c7abaf..9c063b0f5f 100644 --- a/net/tcp/tcp_timer.c +++ b/net/tcp/tcp_timer.c @@ -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; }