Release parent shell folder in GetAttributesOf.
This commit is contained in:
parent
a51dcfcfc6
commit
5dd3e48154
|
@ -590,8 +590,10 @@ IShellFolder_fnGetAttributesOf (IShellFolder2 * iface, UINT cidl,
|
||||||
LPCITEMIDLIST rpidl = NULL;
|
LPCITEMIDLIST rpidl = NULL;
|
||||||
|
|
||||||
hr = SHBindToParent(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&rpidl);
|
hr = SHBindToParent(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&rpidl);
|
||||||
if(SUCCEEDED(hr))
|
if(SUCCEEDED(hr)) {
|
||||||
SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut);
|
SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut);
|
||||||
|
IShellFolder_Release(psfParent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
while (cidl > 0 && *apidl) {
|
while (cidl > 0 && *apidl) {
|
||||||
|
|
|
@ -443,8 +443,10 @@ static HRESULT WINAPI ISF_MyComputer_fnGetAttributesOf (IShellFolder2 * iface,
|
||||||
LPCITEMIDLIST rpidl = NULL;
|
LPCITEMIDLIST rpidl = NULL;
|
||||||
|
|
||||||
hr = SHBindToParent(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&rpidl);
|
hr = SHBindToParent(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&rpidl);
|
||||||
if(SUCCEEDED(hr))
|
if(SUCCEEDED(hr)) {
|
||||||
SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut);
|
SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut);
|
||||||
|
IShellFolder_Release(psfParent);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
while (cidl > 0 && *apidl) {
|
while (cidl > 0 && *apidl) {
|
||||||
pdump (*apidl);
|
pdump (*apidl);
|
||||||
|
|
Loading…
Reference in New Issue