user32/tests: Fix a leak when creating test icons (Valgrind).

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-05-31 14:43:22 +03:00 committed by Alexandre Julliard
parent 4fdfa29e60
commit 59ee884bdf
1 changed files with 2 additions and 0 deletions

View File

@ -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)