Author: cgutman
Date: Tue Aug 18 21:06:52 2009
New Revision: 42772
URL:
http://svn.reactos.org/svn/reactos?rev=42772&view=rev
Log:
- Fix dereference of freed memory
Modified:
trunk/reactos/dll/win32/ws2help/handle.c
Modified: trunk/reactos/dll/win32/ws2help/handle.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2help/handle.c…
==============================================================================
--- trunk/reactos/dll/win32/ws2help/handle.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ws2help/handle.c [iso-8859-1] Tue Aug 18 21:06:52 2009
@@ -65,6 +65,7 @@
ExitThreadApc(ULONG_PTR Context)
{
PWAH_HELPER_CONTEXT HelperContext = (PWAH_HELPER_CONTEXT)Context;
+ HMODULE DllHandle = HelperContext->DllHandle;
/* Close the file handle */
CloseHandle(HelperContext->FileHandle);
@@ -73,7 +74,7 @@
HeapFree(GlobalHeap, 0, HelperContext);
/* Exit the thread and library */
- FreeLibraryAndExitThread(HelperContext->DllHandle, ERROR_SUCCESS);
+ FreeLibraryAndExitThread(DllHandle, ERROR_SUCCESS);
}
DWORD