Fixed a memory leak and a wrong memory free call.
This commit is contained in:
parent
41fc7e5d55
commit
c38342a97b
|
@ -2384,7 +2384,7 @@ static int FILEDLG95_LOOKIN_AddItem(HWND hwnd,LPITEMIDLIST pidl, int iInsertId)
|
||||||
tmpFolder->m_iIndent++;
|
tmpFolder->m_iIndent++;
|
||||||
}
|
}
|
||||||
|
|
||||||
tmpFolder->pidlItem = COMDLG32_PIDL_ILClone(pidl); /* FIXME: memory leak*/
|
tmpFolder->pidlItem = COMDLG32_PIDL_ILClone(pidl);
|
||||||
|
|
||||||
if(tmpFolder->m_iIndent > liInfos->iMaxIndentation)
|
if(tmpFolder->m_iIndent > liInfos->iMaxIndentation)
|
||||||
liInfos->iMaxIndentation = tmpFolder->m_iIndent;
|
liInfos->iMaxIndentation = tmpFolder->m_iIndent;
|
||||||
|
@ -2420,6 +2420,7 @@ static int FILEDLG95_LOOKIN_AddItem(HWND hwnd,LPITEMIDLIST pidl, int iInsertId)
|
||||||
return iItemID;
|
return iItemID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
COMDLG32_SHFree( tmpFolder->pidlItem );
|
||||||
MemFree( tmpFolder );
|
MemFree( tmpFolder );
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
|
|
@ -228,7 +228,7 @@ ULONG WINAPI IShellBrowserImpl_Release(IShellBrowser * iface)
|
||||||
|
|
||||||
if (!--(This->ref))
|
if (!--(This->ref))
|
||||||
{
|
{
|
||||||
HeapFree(GetProcessHeap(),0, This);
|
COMDLG32_SHFree(This);
|
||||||
TRACE("-- destroyed\n");
|
TRACE("-- destroyed\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -306,7 +306,10 @@ HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface,
|
||||||
|
|
||||||
ICOM_THIS(IShellBrowserImpl, iface);
|
ICOM_THIS(IShellBrowserImpl, iface);
|
||||||
|
|
||||||
TRACE("(%p)(%p,0x%08x)\n", This, pidl, wFlags);
|
TRACE("(%p)(pidl=%p,flags=0x%08x(%s))\n", This, pidl, wFlags,
|
||||||
|
(wFlags & SBSP_RELATIVE) ? "SBSP_RELATIVE" :
|
||||||
|
(wFlags & SBSP_PARENT) ? "SBSP_PARENT" :
|
||||||
|
(wFlags & SBSP_ABSOLUTE) ? "SBSP_ABSOLUTE" : "SBPS_????");
|
||||||
|
|
||||||
fodInfos = (FileOpenDlgInfos *) GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
|
fodInfos = (FileOpenDlgInfos *) GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue