Fix a lock leak in an error case.

Reported by:	netchild
Reviewed by:	rwatson
This commit is contained in:
pjd 2006-09-13 06:58:40 +00:00
parent 2318032d41
commit 166e57c29a

View File

@ -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)