[SHELL32]
authorPierre Schweitzer <pierre@reactos.org>
Sat, 24 Oct 2015 10:27:40 +0000 (10:27 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sat, 24 Oct 2015 10:27:40 +0000 (10:27 +0000)
Backport Wine commit: 0efa2331e2f54b81480adeb588972ca16a8dab16
"Fix a cloned pidl leak (Coverity)." by Nikolay Sivov

CID 716480

svn path=/trunk/; revision=69674

reactos/dll/win32/shell32/shlfolder.cpp

index 5aaaa14..f8380ea 100644 (file)
@@ -664,15 +664,15 @@ HRESULT SHELL32_CompareIDs(IShellFolder * iface, LPARAM lParam, LPCITEMIDLIST pi
 
     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(iface->BindToObject(firstpidl, NULL, IID_PPV_ARG(IShellFolder, &psf)))) {