mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
Fix a lock leak in an error case.
Reported by: netchild Reviewed by: rwatson
This commit is contained in:
parent
488633c7f4
commit
689f94bfe6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=162265
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user