Nikolay Sivov : shell32: Fix temporary item array leak (Valgrind).

Alexandre Julliard julliard at wine.codeweavers.com
Thu Oct 29 09:32:12 CDT 2015


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu Oct 29 12:23:57 2015 +0300

shell32: Fix temporary item array leak (Valgrind).

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/shell32/shellitem.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/shell32/shellitem.c b/dlls/shell32/shellitem.c
index f64c2d0..d688f17 100644
--- a/dlls/shell32/shellitem.c
+++ b/dlls/shell32/shellitem.c
@@ -1197,6 +1197,7 @@ HRESULT WINAPI SHCreateShellItemArray(PCIDLIST_ABSOLUTE pidlParent,
     if(SUCCEEDED(ret))
     {
         ret = create_shellitemarray(array, cidl, ppsiItemArray);
+        HeapFree(GetProcessHeap(), 0, array);
         if(SUCCEEDED(ret))
             return ret;
     }
@@ -1310,6 +1311,7 @@ HRESULT WINAPI SHCreateShellItemArrayFromIDLists(UINT cidl,
     if(SUCCEEDED(ret))
     {
         ret = create_shellitemarray(array, cidl, psia);
+        HeapFree(GetProcessHeap(), 0, array);
         if(SUCCEEDED(ret))
             return ret;
     }




More information about the wine-cvs mailing list