net/udp: clear the connection structure after free
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
985829190e
commit
c2ba11d971
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user