shell32: Improve error handling in ParseName() (Coverity).

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2017-10-03 11:41:10 +03:00 committed by Alexandre Julliard
parent 5773203afd
commit 4c160b6f8c

View File

@ -1536,10 +1536,10 @@ static HRESULT WINAPI FolderImpl_ParseName(Folder3 *iface, BSTR name, FolderItem
return S_FALSE; return S_FALSE;
if ((hr = IShellFolder2_GetDisplayNameOf(This->folder, pidl, SHGDN_FORPARSING, &strret)) == S_OK) if ((hr = IShellFolder2_GetDisplayNameOf(This->folder, pidl, SHGDN_FORPARSING, &strret)) == S_OK)
StrRetToBSTR(&strret, pidl, &path); hr = StrRetToBSTR(&strret, pidl, &path);
ILFree(pidl); ILFree(pidl);
if (FAILED(hr)) if (hr != S_OK)
return S_FALSE; return S_FALSE;
hr = FolderItem_Constructor(This, path, item); hr = FolderItem_Constructor(This, path, item);