shell32: Check error return in get_known_folder_path (Coverity).

This commit is contained in:
Marcus Meissner 2011-07-14 08:45:00 +02:00 committed by Alexandre Julliard
parent 3dc66a9d6d
commit a05ba2b9de
1 changed files with 6 additions and 1 deletions

View File

@ -3422,9 +3422,14 @@ static HRESULT get_known_folder_path(
if(hr == S_OK)
{
/* get parent's known folder path (recursive) */
get_known_folder_registry_path(NULL, parentGuid, &parentRegistryPath);
hr = get_known_folder_registry_path(NULL, parentGuid, &parentRegistryPath);
if(!SUCCEEDED(hr)) return hr;
hr = get_known_folder_path(parentGuid, parentRegistryPath, &parentPath);
if(!SUCCEEDED(hr)) {
HeapFree(GetProcessHeap(), 0, parentRegistryPath);
return hr;
}
lstrcatW(path, parentPath);
lstrcatW(path, sBackslash);