Fix return case for negative namelen by jumping to normal exit processing

rather than immediately returning, or we may not unlock necessary locks.

Noticed by:	Mike Heffner <mheffner@acm.vt.edu>
This commit is contained in:
rwatson 2002-08-15 17:34:03 +00:00
parent deb0142560
commit 10845c31e4

View File

@ -254,8 +254,10 @@ accept1(td, uap, compat)
error = copyin(uap->anamelen, &namelen, sizeof (namelen));
if(error)
goto done2;
if (namelen < 0)
return (EINVAL);
if (namelen < 0) {
error = EINVAL;
goto done2;
}
}
error = fgetsock(td, uap->s, &head, &fflag);
if (error)