From 4e9ecfe8a7db26ea8da5606ea9b5a1fe460003af Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 18 Aug 2009 19:06:52 +0000 Subject: [PATCH] - Fix dereference of freed memory svn path=/trunk/; revision=42772 --- reactos/dll/win32/ws2help/handle.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/ws2help/handle.c b/reactos/dll/win32/ws2help/handle.c index cc76e734cfc..e34de902760 100644 --- a/reactos/dll/win32/ws2help/handle.c +++ b/reactos/dll/win32/ws2help/handle.c @@ -65,6 +65,7 @@ CALLBACK 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 @@ ExitThreadApc(ULONG_PTR Context) HeapFree(GlobalHeap, 0, HelperContext); /* Exit the thread and library */ - FreeLibraryAndExitThread(HelperContext->DllHandle, ERROR_SUCCESS); + FreeLibraryAndExitThread(DllHandle, ERROR_SUCCESS); } DWORD -- 2.17.1