From 6494e99ae8e43fd3194b9bf2a70f5a972c2e1db6 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 25 Sep 2009 23:44:51 +0000 Subject: [PATCH] - We want socket closure notification so we don't leak our socket context when the socket is destroyed - Free socket context in WSHNotify svn path=/trunk/; revision=43154 --- reactos/dll/win32/wshtcpip/wshtcpip.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/wshtcpip/wshtcpip.c b/reactos/dll/win32/wshtcpip/wshtcpip.c index b13fabc6324..bc3fcee3784 100644 --- a/reactos/dll/win32/wshtcpip/wshtcpip.c +++ b/reactos/dll/win32/wshtcpip/wshtcpip.c @@ -312,7 +312,16 @@ WSHNotify( IN HANDLE TdiConnectionObjectHandle, IN DWORD NotifyEvent) { - UNIMPLEMENTED + switch (NotifyEvent) + { + case WSH_NOTIFY_CLOSE: + HeapFree(GetProcessHeap(), 0, HelperDllSocketContext); + break; + + default: + DPRINT1("Unwanted notification received! (%d)\n", NotifyEvent); + break; + } return 0; } @@ -446,6 +455,7 @@ WSHOpenSocket2( Context->Flags = Flags; *HelperDllSocketContext = Context; + *NotificationEvents = WSH_NOTIFY_CLOSE; return NO_ERROR; }