Nikolay Sivov : shell32: Properly handle SHGetPathFromIDListW failure ( PVS-Studio).

Alexandre Julliard julliard at wine.codeweavers.com
Tue Oct 20 11:28:30 CDT 2015


Module: wine
Branch: master
Commit: 186bed3d168089b00c794ab5c32e808e15b6b742
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=186bed3d168089b00c794ab5c32e808e15b6b742

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Tue Oct 20 16:44:49 2015 +0300

shell32: Properly handle SHGetPathFromIDListW failure (PVS-Studio).

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

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

diff --git a/dlls/shell32/brsfolder.c b/dlls/shell32/brsfolder.c
index 1a2716e..4040407 100644
--- a/dlls/shell32/brsfolder.c
+++ b/dlls/shell32/brsfolder.c
@@ -757,9 +757,10 @@ static HRESULT BrsFolder_NewFolder(browse_info *info)
     if(FAILED(hr))
         return hr;
 
-    hr = SHGetPathFromIDListW(info->pidlRet, name);
-    if(FAILED(hr))
+    if(!SHGetPathFromIDListW(info->pidlRet, name)) {
+        hr = E_FAIL;
         goto cleanup;
+    }
 
     len = strlenW(name);
     if(len<MAX_PATH)




More information about the wine-cvs mailing list