Module: xenomai-3 Branch: master Commit: c829dc9fcd83e139487227c1487ea220f833ab30 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=c829dc9fcd83e139487227c1487ea220f833ab30
Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org> Date: Sun Oct 11 16:04:00 2015 +0200 rtnet/udp: fix sendmsg error path --- kernel/drivers/net/stack/ipv4/udp/udp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/drivers/net/stack/ipv4/udp/udp.c b/kernel/drivers/net/stack/ipv4/udp/udp.c index 1e6d5d7..e2923d6 100644 --- a/kernel/drivers/net/stack/ipv4/udp/udp.c +++ b/kernel/drivers/net/stack/ipv4/udp/udp.c @@ -564,8 +564,10 @@ ssize_t rt_udp_sendmsg(struct rtdm_fd *fd, const struct msghdr *msg, int msg_fla } else { rtdm_lock_get_irqsave(&udp_socket_base_lock, context); - if (sock->prot.inet.state != TCP_ESTABLISHED) + if (sock->prot.inet.state != TCP_ESTABLISHED) { + rtdm_lock_put_irqrestore(&udp_socket_base_lock, context); return -ENOTCONN; + } daddr = sock->prot.inet.daddr; dport = sock->prot.inet.dport; _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git