net/icmp[v6]: destroy nxsem properly
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
parent
dff81756cf
commit
873023f89b
@ -449,6 +449,8 @@ ssize_t icmp_recvmsg(FAR struct socket *psock, FAR struct msghdr *msg,
|
||||
icmp_callback_free(dev, conn, state.recv_cb);
|
||||
}
|
||||
|
||||
nxsem_destroy(&state.recv_sem);
|
||||
|
||||
/* Return the negated error number in the event of a failure, or the
|
||||
* number of bytes received on success.
|
||||
*/
|
||||
|
@ -445,6 +445,8 @@ ssize_t icmp_sendmsg(FAR struct socket *psock, FAR struct msghdr *msg,
|
||||
icmp_callback_free(dev, conn, state.snd_cb);
|
||||
}
|
||||
|
||||
nxsem_destroy(&state.snd_sem);
|
||||
|
||||
net_unlock();
|
||||
|
||||
/* Return the negated error number in the event of a failure, or the
|
||||
|
@ -456,6 +456,8 @@ ssize_t icmpv6_recvmsg(FAR struct socket *psock, FAR struct msghdr *msg,
|
||||
icmpv6_callback_free(dev, conn, state.recv_cb);
|
||||
}
|
||||
|
||||
nxsem_destroy(&state.recv_sem);
|
||||
|
||||
/* Return the negated error number in the event of a failure, or the
|
||||
* number of bytes received on success.
|
||||
*/
|
||||
|
@ -426,6 +426,8 @@ ssize_t icmpv6_sendmsg(FAR struct socket *psock, FAR struct msghdr *msg,
|
||||
icmpv6_callback_free(dev, conn, state.snd_cb);
|
||||
}
|
||||
|
||||
nxsem_destroy(&state.snd_sem);
|
||||
|
||||
net_unlock();
|
||||
|
||||
/* Return the negated error number in the event of a failure, or the
|
||||
|
Loading…
x
Reference in New Issue
Block a user