shell32: Release the returned imagelist.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Huw Davies 2017-04-25 09:04:59 +01:00 committed by Alexandre Julliard
parent edb760097c
commit 826871ba95
1 changed files with 5 additions and 1 deletions

View File

@ -29,6 +29,7 @@
#include "wine/debug.h"
#include "undocshell.h"
#include "commoncontrols.h"
#include "pidl.h"
#include "shell32_main.h"
#include "shellapi.h"
@ -282,7 +283,10 @@ static void InitializeTreeView( browse_info *info )
static int GetIcon(LPCITEMIDLIST lpi, UINT uFlags)
{
SHFILEINFOW sfi;
SHGetFileInfoW((LPCWSTR)lpi, 0 ,&sfi, sizeof(SHFILEINFOW), uFlags);
IImageList *list;
list = (IImageList *)SHGetFileInfoW((LPCWSTR)lpi, 0 ,&sfi, sizeof(SHFILEINFOW), uFlags);
if (list) IImageList_Release(list);
return sfi.iIcon;
}