Fix a lock leak in an error case.

Reported by:	netchild
Reviewed by:	rwatson
This commit is contained in:
Pawel Jakub Dawidek 2006-09-13 06:58:40 +00:00
parent 488633c7f4
commit 689f94bfe6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=162265

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)