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