comctl32: Avoid leak of hShell32 (Coverity).

This commit is contained in:
Marcus Meissner 2013-01-09 02:42:13 +01:00 committed by Alexandre Julliard
parent 063dccdd8a
commit d8d83d2eb3
1 changed files with 4 additions and 1 deletions

View File

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