When retrieving SO_ERROR via getsockopt(), hold the socket lock around

the retrieval and replacement with 0.

MFC after:	1 week
This commit is contained in:
rwatson 2006-06-18 19:02:49 +00:00
parent 374a73f6b1
commit 350dce4037

View File

@ -2180,8 +2180,10 @@ integer:
goto integer;
case SO_ERROR:
SOCK_LOCK(so);
optval = so->so_error;
so->so_error = 0;
SOCK_UNLOCK(so);
goto integer;
case SO_SNDBUF: