- 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
This commit is contained in:
Cameron Gutman 2009-09-25 23:44:51 +00:00
parent dc5a52bb5a
commit 6494e99ae8

View file

@ -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;
}