When validating that the length sum in recvit(), we fail to release

Giant on an error.  Add a Giant acquisition.

Reviewed by:	sam, bms
This commit is contained in:
Robert Watson 2004-03-29 01:37:06 +00:00
parent 88fec12430
commit 74041f5a10

View File

@ -962,6 +962,7 @@ recvit(td, s, mp, namelenp)
for (i = 0; i < mp->msg_iovlen; i++, iov++) {
if ((auio.uio_resid += iov->iov_len) < 0) {
fputsock(so);
mtx_unlock(&Giant);
return (EINVAL);
}
}