From 3b490d4e3a1d8c7f1a6f8a514efffcd0f25a81d6 Mon Sep 17 00:00:00 2001 From: "chao.an" Date: Sat, 1 Jan 2022 23:32:21 +0800 Subject: [PATCH] net/icmp: post the semaphore if multiple references Signed-off-by: chao.an --- net/icmp/icmp_conn.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/icmp/icmp_conn.c b/net/icmp/icmp_conn.c index 52ce99f088..3cc82691c2 100644 --- a/net/icmp/icmp_conn.c +++ b/net/icmp/icmp_conn.c @@ -165,8 +165,9 @@ void icmp_free(FAR struct icmp_conn_s *conn) /* Free the connection */ dq_addlast(&conn->node, &g_free_icmp_connections); - nxsem_post(&g_free_sem); } + + nxsem_post(&g_free_sem); } /****************************************************************************