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 <anchao@xiaomi.com>
This commit is contained in:
chao.an 2021-01-28 19:47:14 +08:00 committed by Masayuki Ishikawa
parent 04dffb551d
commit e03218ab71

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;
}