dlls/shell32/pidl.c

Michael Jung mjung at iss.tu-darmstadt.de
Mon Aug 15 05:02:39 CDT 2005


Hi Ge,

On Saturday 13 August 2005 20:55, Ge van Geldorp wrote:
>      dwAttributes = SFGAO_FILESYSTEM;
>      hr = IShellFolder_GetAttributesOf(psfFolder, 1, &pidlLast,
> &dwAttributes); -    if (FAILED(hr) || !(dwAttributes & SFGAO_FILESYSTEM))
> return FALSE; +    if (FAILED(hr) || !(dwAttributes & SFGAO_FILESYSTEM)) {
> +        IShellFolder_Release(psfFolder);
> +        ILFree((LPITEMIDLIST) pidlLast);
> +        return FALSE;
> +    }
>

I had another look at this after realising that Alexandre did'nt apply the 
patch. SHBindToParent does not allocate a new PIDL for pidlLast, but returns 
a pointer to right location in pidl. This means you should not free it. 
There's still the problem that the shell folder isn't released in failure 
cases.

Sorry, I didn't realize this. Once again I'm impressed that Alexandre always 
catches those things.

Bye, 
-- 
Michael Jung
mjung at iss.tu-darmstadt.de



More information about the wine-devel mailing list