net/udp: clear the connection structure after free

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an
2022-03-16 12:09:25 +08:00
committed by Xiang Xiao
parent 985829190e
commit c2ba11d971
+4
View File
@@ -696,6 +696,10 @@ void udp_free(FAR struct udp_conn_s *conn)
#endif
/* Clear the connection structure */
memset(conn, 0, sizeof(*conn));
/* Free the connection */
dq_addlast(&conn->sconn.node, &g_free_udp_connections);