From 59ee884bdf4947f5939499456539fca7a5806939 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Tue, 31 May 2016 14:43:22 +0300 Subject: [PATCH] user32/tests: Fix a leak when creating test icons (Valgrind). Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/user32/tests/cursoricon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c index 5138c5617e1..5f2306aee4f 100644 --- a/dlls/user32/tests/cursoricon.c +++ b/dlls/user32/tests/cursoricon.c @@ -1192,6 +1192,8 @@ static void create_ico_file(const char *filename, const test_icon_entries_t *tes ret = WriteFile(file, buf, icon_size, &bytes_written, NULL); ok(ret && bytes_written == icon_size, "icon.ico created improperly.\n"); CloseHandle(file); + + HeapFree(GetProcessHeap(), 0, buf); } static void test_LoadImage(void)