Module: wine Branch: master Commit: 4696a53679cdaabd858f51d214c6fbd024e5d975 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4696a53679cdaabd858f51d214...
Author: Dan Kegel dank@kegel.com Date: Wed Oct 21 05:57:26 2009 -0700
kernel32: Fix two little leaks in heap test.
Found by valgrind.
---
dlls/kernel32/tests/heap.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/kernel32/tests/heap.c b/dlls/kernel32/tests/heap.c index c59d304..56f9744 100644 --- a/dlls/kernel32/tests/heap.c +++ b/dlls/kernel32/tests/heap.c @@ -72,6 +72,7 @@ static void test_heap(void) /* Heap*() functions */ mem = HeapAlloc(GetProcessHeap(), 0, 0); ok(mem != NULL, "memory not allocated for size 0\n"); + HeapFree(GetProcessHeap(), 0, mem);
mem = HeapReAlloc(GetProcessHeap(), 0, NULL, 10); ok(mem == NULL, "memory allocated by HeapReAlloc\n"); @@ -249,6 +250,8 @@ static void test_heap(void) "Expected ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); }
+ GlobalFree(gbl); + /* ####################################### */ /* Local*() functions */ gbl = LocalAlloc(LMEM_MOVEABLE, 0);