mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 03:05:40 +00:00
[WS2_32] Dereference socket in case of parameter check failure. Thanks Thomas. ROSTEST-278
svn path=/trunk/; revision=74652
This commit is contained in:
parent
44ac5bf123
commit
fe8ca04a83
2 changed files with 6 additions and 0 deletions
|
@ -236,6 +236,9 @@ getsockname(IN SOCKET s,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* Deference the Socket Context */
|
||||||
|
WsSockDereference(Socket);
|
||||||
|
|
||||||
/* name or namelen not valid */
|
/* name or namelen not valid */
|
||||||
ErrorCode = WSAEFAULT;
|
ErrorCode = WSAEFAULT;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,6 +66,9 @@ bind(IN SOCKET s,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* Deference the Socket Context */
|
||||||
|
WsSockDereference(Socket);
|
||||||
|
|
||||||
/* name or namelen not valid */
|
/* name or namelen not valid */
|
||||||
ErrorCode = WSAEFAULT;
|
ErrorCode = WSAEFAULT;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue