Fix a lock leak in an error case.
Reported by: netchild Reviewed by: rwatson
This commit is contained in:
parent
488633c7f4
commit
689f94bfe6
@ -1028,11 +1028,11 @@ sosend_dgram(so, addr, uio, top, control, flags, td)
|
|||||||
if (flags & MSG_OOB)
|
if (flags & MSG_OOB)
|
||||||
space += 1024;
|
space += 1024;
|
||||||
space -= clen;
|
space -= clen;
|
||||||
|
SOCKBUF_UNLOCK(&so->so_snd);
|
||||||
if (resid > space) {
|
if (resid > space) {
|
||||||
error = EMSGSIZE;
|
error = EMSGSIZE;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
SOCKBUF_UNLOCK(&so->so_snd);
|
|
||||||
if (uio == NULL) {
|
if (uio == NULL) {
|
||||||
resid = 0;
|
resid = 0;
|
||||||
if (flags & MSG_EOR)
|
if (flags & MSG_EOR)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user