From 166e57c29a09569bc76efcc5752635fc36c9c1da Mon Sep 17 00:00:00 2001 From: pjd Date: Wed, 13 Sep 2006 06:58:40 +0000 Subject: Fix a lock leak in an error case. Reported by: netchild Reviewed by: rwatson --- sys/kern/uipc_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index c9da6b8..480bde8 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1028,11 +1028,11 @@ sosend_dgram(so, addr, uio, top, control, flags, td) if (flags & MSG_OOB) space += 1024; space -= clen; + SOCKBUF_UNLOCK(&so->so_snd); if (resid > space) { error = EMSGSIZE; goto out; } - SOCKBUF_UNLOCK(&so->so_snd); if (uio == NULL) { resid = 0; if (flags & MSG_EOR) -- cgit v1.1