Skip to content

Commit

Permalink
Fix memory leak. (Thanks to tapcio)
Browse files Browse the repository at this point in the history
  • Loading branch information
TsudaKageyu committed Dec 5, 2014
1 parent 58fbb49 commit 0cf8f96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hook.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,8 @@ MH_STATUS WINAPI MH_Uninitialize(VOID)

// Free the internal function buffer.
UninitializeBuffer();
HeapDestroy(g_hHeap);
HeapFree(g_hHeap, 0, g_hooks.pItems);
HeapDestroy(g_hHeap);

g_hHeap = NULL;

Expand Down

0 comments on commit 0cf8f96

Please sign in to comment.