Release parent shell folder in GetAttributesOf.

This commit is contained in:
Michael Jung 2005-07-11 10:23:56 +00:00 committed by Alexandre Julliard
parent a51dcfcfc6
commit 5dd3e48154
2 changed files with 6 additions and 2 deletions

View File

@ -590,8 +590,10 @@ IShellFolder_fnGetAttributesOf (IShellFolder2 * iface, UINT cidl,
LPCITEMIDLIST rpidl = NULL;
hr = SHBindToParent(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&rpidl);
if(SUCCEEDED(hr))
if(SUCCEEDED(hr)) {
SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut);
IShellFolder_Release(psfParent);
}
}
else {
while (cidl > 0 && *apidl) {

View File

@ -443,8 +443,10 @@ static HRESULT WINAPI ISF_MyComputer_fnGetAttributesOf (IShellFolder2 * iface,
LPCITEMIDLIST rpidl = NULL;
hr = SHBindToParent(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&rpidl);
if(SUCCEEDED(hr))
if(SUCCEEDED(hr)) {
SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut);
IShellFolder_Release(psfParent);
}
} else {
while (cidl > 0 && *apidl) {
pdump (*apidl);