Author: phater
Date: Thu May 25 14:51:16 2017
New Revision: 74652
URL:
http://svn.reactos.org/svn/reactos?rev=74652&view=rev
Log:
[WS2_32] Dereference socket in case of parameter check failure. Thanks Thomas.
ROSTEST-278
Modified:
trunk/reactos/dll/win32/ws2_32/src/sockctrl.c
trunk/reactos/dll/win32/ws2_32/src/socklife.c
Modified: trunk/reactos/dll/win32/ws2_32/src/sockctrl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/src/sockc…
==============================================================================
--- trunk/reactos/dll/win32/ws2_32/src/sockctrl.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ws2_32/src/sockctrl.c [iso-8859-1] Thu May 25 14:51:16 2017
@@ -236,6 +236,9 @@
}
else
{
+ /* Deference the Socket Context */
+ WsSockDereference(Socket);
+
/* name or namelen not valid */
ErrorCode = WSAEFAULT;
}
Modified: trunk/reactos/dll/win32/ws2_32/src/socklife.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32/src/sockl…
==============================================================================
--- trunk/reactos/dll/win32/ws2_32/src/socklife.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ws2_32/src/socklife.c [iso-8859-1] Thu May 25 14:51:16 2017
@@ -66,6 +66,9 @@
}
else
{
+ /* Deference the Socket Context */
+ WsSockDereference(Socket);
+
/* name or namelen not valid */
ErrorCode = WSAEFAULT;
}