[PATCH 11/11] Fix a cloned PIDL leak (Valgrind)

Nikolay Sivov nsivov at codeweavers.com
Sat Jan 15 12:42:59 CST 2011


---
 dlls/shell32/shfldr_unixfs.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c
index 1c9b672..8f52a80 100644
--- a/dlls/shell32/shfldr_unixfs.c
+++ b/dlls/shell32/shfldr_unixfs.c
@@ -1022,7 +1022,7 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_CompareIDs(IShellFolder2* iface,
 {
     BOOL isEmpty1, isEmpty2;
     HRESULT hr = E_FAIL;
-    LPITEMIDLIST firstpidl;
+    LPCITEMIDLIST firstpidl;
     IShellFolder2 *psf;
     int compare;
 
@@ -1055,7 +1055,7 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_CompareIDs(IShellFolder2* iface,
     else if (pidl1->mkid.cb > pidl2->mkid.cb)
         return MAKE_HRESULT(SEVERITY_SUCCESS, 0, (WORD)1);
 
-    firstpidl = ILCloneFirst(pidl1);
+    firstpidl = pidl1;
     pidl1 = ILGetNext(pidl1);
     pidl2 = ILGetNext(pidl2);
 
@@ -1073,7 +1073,6 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_CompareIDs(IShellFolder2* iface,
         IShellFolder2_Release(psf);
     }
 
-    ILFree(firstpidl);
     return hr;
 }
 
-- 
1.5.6.5


--------------000405030704070108070700--



More information about the wine-patches mailing list