Zhiyi Zhang : comctl32/tests: Fix a memory leak.
Alexandre Julliard
julliard at winehq.org
Wed Aug 29 16:10:45 CDT 2018
Module: wine
Branch: master
Commit: ba1eb91a690b55042f967255c57d2e2f6aa1dd53
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ba1eb91a690b55042f967255c57d2e2f6aa1dd53
Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date: Wed Aug 29 23:13:45 2018 +0800
comctl32/tests: Fix a memory leak.
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/comctl32/tests/button.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/tests/button.c b/dlls/comctl32/tests/button.c
index db8d2b0..b27ab84 100644
--- a/dlls/comctl32/tests/button.c
+++ b/dlls/comctl32/tests/button.c
@@ -32,8 +32,9 @@
static BOOL (WINAPI *pSetWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR);
static BOOL (WINAPI *pRemoveWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR);
static LRESULT (WINAPI *pDefSubclassProc)(HWND, UINT, WPARAM, LPARAM);
-static HIMAGELIST(WINAPI *pImageList_Create)(int, int, UINT, int, int);
-static int(WINAPI *pImageList_Add)(HIMAGELIST, HBITMAP, HBITMAP);
+static HIMAGELIST (WINAPI *pImageList_Create)(int, int, UINT, int, int);
+static int (WINAPI *pImageList_Add)(HIMAGELIST, HBITMAP, HBITMAP);
+static BOOL (WINAPI *pImageList_Destroy)(HIMAGELIST);
/****************** button message test *************************/
#define ID_BUTTON 0x000e
@@ -82,6 +83,7 @@ static void init_functions(void)
#define X(f) p##f = (void *)GetProcAddress(hmod, #f);
X(ImageList_Create);
X(ImageList_Add);
+ X(ImageList_Destroy);
#undef X
}
@@ -1352,6 +1354,8 @@ static void test_get_set_imagelist(void)
DestroyWindow(hwnd);
}
+
+ pImageList_Destroy(himl);
}
static void test_get_set_textmargin(void)
More information about the wine-cvs
mailing list