[PATCH] comctl32: avoid leak of hShell32 (Coverity)
Marcus Meissner
meissner at suse.de
Tue Jan 8 19:42:13 CST 2013
CID 713345
---
dlls/comctl32/tests/imagelist.c | 5 ++++-
1 Datei geändert, 4 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)
diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c
index f2da3c2..19d2437 100644
--- a/dlls/comctl32/tests/imagelist.c
+++ b/dlls/comctl32/tests/imagelist.c
@@ -1160,6 +1160,7 @@ static void test_shell_imagelist(void)
if (!pSHGetImageList)
{
win_skip("SHGetImageList not available, skipping test\n");
+ FreeLibrary(hShell32);
return;
}
@@ -1168,8 +1169,10 @@ static void test_shell_imagelist(void)
ok(SUCCEEDED(hr), "SHGetImageList failed, hr=%x\n", hr);
- if (hr != S_OK)
+ if (hr != S_OK) {
+ FreeLibrary(hShell32);
return;
+ }
IImageList_GetImageCount(iml, &out);
ok(out > 0, "IImageList_GetImageCount returned out <= 0\n");
--
1.7.10.4
More information about the wine-patches
mailing list