From 0efa2331e2f54b81480adeb588972ca16a8dab16 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov <nsivov@codeweavers.com> Date: Thu, 10 Apr 2014 09:22:44 +0400 Subject: [PATCH] shell32: Fix a cloned pidl leak (Coverity). --- dlls/shell32/shlfolder.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/shell32/shlfolder.c b/dlls/shell32/shlfolder.c index 1b53edf4471..0fb8df95296 100644 --- a/dlls/shell32/shlfolder.c +++ b/dlls/shell32/shlfolder.c @@ -531,11 +531,11 @@ HRESULT SHELL32_CompareIDs(IShellFolder2 *sf, LPARAM lParam, LPCITEMIDLIST pidl1 isEmpty2 = _ILIsDesktop (nextpidl2); if (isEmpty1 && isEmpty2) { - return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 0 ); + nReturn = MAKE_HRESULT( SEVERITY_SUCCESS, 0, 0 ); } else if (isEmpty1) { - return MAKE_HRESULT( SEVERITY_SUCCESS, 0, (WORD)-1 ); + nReturn = MAKE_HRESULT( SEVERITY_SUCCESS, 0, (WORD)-1 ); } else if (isEmpty2) { - return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 1 ); + nReturn = MAKE_HRESULT( SEVERITY_SUCCESS, 0, 1 ); /* optimizing end */ } else if (SUCCEEDED(IShellFolder2_BindToObject(sf, firstpidl, NULL, &IID_IShellFolder, (void **)&psf))) { nReturn = IShellFolder_CompareIDs (psf, lParam, nextpidl1, nextpidl2);