Commit ff23dd29 authored by Michael Jung's avatar Michael Jung Committed by Alexandre Julliard

Release shell folders only if they were successfully acquired.

parent 324267c4
...@@ -404,10 +404,10 @@ BOOL HCR_GetFolderAttributes(LPCITEMIDLIST pidlFolder, LPDWORD pdwAttributes) ...@@ -404,10 +404,10 @@ BOOL HCR_GetFolderAttributes(LPCITEMIDLIST pidlFolder, LPDWORD pdwAttributes)
(LPVOID*)&psfFolder); (LPVOID*)&psfFolder);
if (SUCCEEDED(hr)) { if (SUCCEEDED(hr)) {
hr = IShellFolder_GetAttributesOf(psfFolder, 0, NULL, pdwAttributes); hr = IShellFolder_GetAttributesOf(psfFolder, 0, NULL, pdwAttributes);
IShellFolder_Release(psfFolder);
} }
IShellFolder_Release(psfDesktop);
} }
IShellFolder_Release(psfFolder);
IShellFolder_Release(psfDesktop);
if (FAILED(hr)) return FALSE; if (FAILED(hr)) return FALSE;
} else { } else {
lResult = RegQueryValueExW(hSFKey, wszAttributes, 0, NULL, (LPBYTE)&dwTemp, &dwLen); lResult = RegQueryValueExW(hSFKey, wszAttributes, 0, NULL, (LPBYTE)&dwTemp, &dwLen);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment