Commit 36cf7b3d authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

shell32: Free item lists with ILFree.

parent c79ffafc
......@@ -165,7 +165,7 @@ HGLOBAL RenderFILENAMEA (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl)
return 0;
bSuccess = SHGetPathFromIDListA(pidl, szTemp);
SHFree(pidl);
ILFree(pidl);
if (!bSuccess)
return 0;
......@@ -197,7 +197,7 @@ HGLOBAL RenderFILENAMEW (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl)
return 0;
bSuccess = SHGetPathFromIDListW(pidl, szTemp);
SHFree(pidl);
ILFree(pidl);
if (!bSuccess)
return 0;
......
......@@ -636,18 +636,18 @@ static HRESULT WINAPI ISF_ControlPanel_fnGetUIObjectOf(IShellFolder2 *iface, HWN
} else if (IsEqualIID(riid, &IID_IExtractIconA) &&(cidl == 1)) {
pidl = ILCombine(This->pidlRoot, apidl[0]);
pObj = (LPUNKNOWN) IExtractIconA_Constructor(pidl);
SHFree(pidl);
ILFree(pidl);
hr = S_OK;
} else if (IsEqualIID(riid, &IID_IExtractIconW) &&(cidl == 1)) {
pidl = ILCombine(This->pidlRoot, apidl[0]);
pObj = (LPUNKNOWN) IExtractIconW_Constructor(pidl);
SHFree(pidl);
ILFree(pidl);
hr = S_OK;
} else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA))
&& (cidl == 1)) {
pidl = ILCombine(This->pidlRoot, apidl[0]);
hr = IShellLink_ConstructFromFile(NULL, riid, pidl, &pObj);
SHFree(pidl);
ILFree(pidl);
} else {
hr = E_NOINTERFACE;
}
......
......@@ -1328,7 +1328,7 @@ HRESULT WINAPI SHBindToFolderIDListParent(IShellFolder *psf, LPCITEMIDLIST pidl,
LPITEMIDLIST pidlParent = ILClone(pidl);
ILRemoveLastID(pidlParent);
hr = IShellFolder_BindToObject(psf, pidlParent, NULL, riid, ppv);
SHFree (pidlParent);
ILFree(pidlParent);
}
if (psfDesktop)
......
......@@ -530,14 +530,14 @@ static HRESULT WINAPI ISF_Desktop_fnGetUIObjectOf (IShellFolder2 * iface,
{
pidl = ILCombine (This->pidlRoot, apidl[0]);
pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl);
SHFree (pidl);
ILFree(pidl);
hr = S_OK;
}
else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1))
{
pidl = ILCombine (This->pidlRoot, apidl[0]);
pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl);
SHFree (pidl);
ILFree(pidl);
hr = S_OK;
}
else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1))
......@@ -550,7 +550,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetUIObjectOf (IShellFolder2 * iface,
{
pidl = ILCombine (This->pidlRoot, apidl[0]);
hr = IShellLink_ConstructFromFile(NULL, riid, pidl, &pObj);
SHFree (pidl);
ILFree(pidl);
}
else
hr = E_NOINTERFACE;
......
......@@ -710,12 +710,12 @@ IShellFolder_fnGetUIObjectOf (IShellFolder2 * iface,
} else if (IsEqualIID (riid, &IID_IExtractIconA) && (cidl == 1)) {
pidl = ILCombine (This->pidlRoot, apidl[0]);
pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl);
SHFree (pidl);
ILFree(pidl);
hr = S_OK;
} else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1)) {
pidl = ILCombine (This->pidlRoot, apidl[0]);
pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl);
SHFree (pidl);
ILFree(pidl);
hr = S_OK;
} else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) {
hr = IShellFolder2_QueryInterface (iface, &IID_IDropTarget,
......@@ -724,7 +724,7 @@ IShellFolder_fnGetUIObjectOf (IShellFolder2 * iface,
IsEqualIID(riid,&IID_IShellLinkA)) && (cidl == 1)) {
pidl = ILCombine (This->pidlRoot, apidl[0]);
hr = IShellLink_ConstructFromFile(NULL, riid, pidl, &pObj);
SHFree (pidl);
ILFree(pidl);
} else {
hr = E_NOINTERFACE;
}
......@@ -1305,7 +1305,7 @@ ISFHelper_fnDeleteItems (ISFHelper * iface, UINT cidl, LPCITEMIDLIST * apidl)
{
LPITEMIDLIST pidl = ILCombine(This->pidlRoot, apidl[i]);
SHChangeNotify(wEventId, SHCNF_IDLIST, pidl, NULL);
SHFree(pidl);
ILFree(pidl);
}
wszCurrentPath += lstrlenW(wszCurrentPath)+1;
......
......@@ -527,14 +527,14 @@ static HRESULT WINAPI ISF_MyComputer_fnGetUIObjectOf (IShellFolder2 * iface,
{
pidl = ILCombine (This->pidlRoot, apidl[0]);
pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl);
SHFree (pidl);
ILFree(pidl);
hr = S_OK;
}
else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1))
{
pidl = ILCombine (This->pidlRoot, apidl[0]);
pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl);
SHFree (pidl);
ILFree(pidl);
hr = S_OK;
}
else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1))
......@@ -547,7 +547,7 @@ static HRESULT WINAPI ISF_MyComputer_fnGetUIObjectOf (IShellFolder2 * iface,
{
pidl = ILCombine (This->pidlRoot, apidl[0]);
hr = IShellLink_ConstructFromFile(NULL, riid, pidl, &pObj);
SHFree (pidl);
ILFree(pidl);
}
else
hr = E_NOINTERFACE;
......
......@@ -424,14 +424,14 @@ static HRESULT WINAPI ISF_NetworkPlaces_fnGetUIObjectOf (IShellFolder2 * iface,
{
pidl = ILCombine (This->pidlRoot, apidl[0]);
pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl);
SHFree (pidl);
ILFree(pidl);
hr = S_OK;
}
else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1))
{
pidl = ILCombine (This->pidlRoot, apidl[0]);
pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl);
SHFree (pidl);
ILFree(pidl);
hr = S_OK;
}
else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1))
......
......@@ -282,7 +282,7 @@ static void DoOpenExplore(ContextMenu *This, HWND hwnd, LPCSTR verb)
sei.nShow = SW_SHOWNORMAL;
sei.lpVerb = verb;
ShellExecuteExA(&sei);
SHFree(pidlFQ);
ILFree(pidlFQ);
}
/**************************************************************************
......@@ -1150,7 +1150,7 @@ static HRESULT paste_pidls(ContextMenu *This, ITEMIDLIST **pidls, UINT count)
if(psfhlpsrc) ISFHelper_Release(psfhlpsrc);
IShellFolder_Release(psfFrom);
}
SHFree(pidl_dir);
ILFree(pidl_dir);
}
IShellFolder_Release(psfDesktop);
......
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