[PATCH] shell32: Stop memory leak (valgrind)

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Thu Oct 29 04:21:46 CDT 2015


Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
 dlls/shell32/shellitem.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/shell32/shellitem.c b/dlls/shell32/shellitem.c
index f64c2d0..799c6c0 100644
--- a/dlls/shell32/shellitem.c
+++ b/dlls/shell32/shellitem.c
@@ -1198,7 +1198,10 @@ HRESULT WINAPI SHCreateShellItemArray(PCIDLIST_ABSOLUTE pidlParent,
     {
         ret = create_shellitemarray(array, cidl, ppsiItemArray);
         if(SUCCEEDED(ret))
+        {
+            HeapFree(GetProcessHeap(), 0, array);
             return ret;
+        }
     }
 
     /* Something failed, clean up. */
-- 
2.6.1




More information about the wine-patches mailing list