Huw Davies : shell32: Release the returned imagelist.

Alexandre Julliard julliard at winehq.org
Tue Apr 25 16:22:35 CDT 2017


Module: wine
Branch: master
Commit: 826871ba953c17193f3904d27d192d2ef6801894
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=826871ba953c17193f3904d27d192d2ef6801894

Author: Huw Davies <huw at codeweavers.com>
Date:   Tue Apr 25 09:04:59 2017 +0100

shell32: Release the returned imagelist.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/shell32/brsfolder.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dlls/shell32/brsfolder.c b/dlls/shell32/brsfolder.c
index 4040407..a473874 100644
--- a/dlls/shell32/brsfolder.c
+++ b/dlls/shell32/brsfolder.c
@@ -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;
 }
 




More information about the wine-cvs mailing list