From 4b317fde2abe6f8a3386a929211f8d6883a9fad5 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sat, 15 Jan 2011 21:42:59 +0300 Subject: [PATCH] shell32: Fix a cloned PIDL leak (Valgrind). --- dlls/shell32/shfldr_unixfs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c index 1c9b6721868..8f52a80c5c4 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; } -- 2.11.4.GIT