[PATCH] shell32: Improve error handling in ParseName() (Coverity)

Nikolay Sivov nsivov at codeweavers.com
Tue Oct 3 03:41:10 CDT 2017


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/shell32/shelldispatch.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/shell32/shelldispatch.c b/dlls/shell32/shelldispatch.c
index 0baab6b27f..11890f1da3 100644
--- a/dlls/shell32/shelldispatch.c
+++ b/dlls/shell32/shelldispatch.c
@@ -1536,10 +1536,10 @@ static HRESULT WINAPI FolderImpl_ParseName(Folder3 *iface, BSTR name, FolderItem
         return S_FALSE;
 
     if ((hr = IShellFolder2_GetDisplayNameOf(This->folder, pidl, SHGDN_FORPARSING, &strret)) == S_OK)
-        StrRetToBSTR(&strret, pidl, &path);
+        hr = StrRetToBSTR(&strret, pidl, &path);
 
     ILFree(pidl);
-    if (FAILED(hr))
+    if (hr != S_OK)
         return S_FALSE;
 
     hr = FolderItem_Constructor(This, path, item);
-- 
2.14.2




More information about the wine-patches mailing list