Commit c38342a9 authored by Juergen Schmied's avatar Juergen Schmied Committed by Alexandre Julliard

Fixed a memory leak and a wrong memory free call.

parent 41fc7e5d
...@@ -2384,7 +2384,7 @@ static int FILEDLG95_LOOKIN_AddItem(HWND hwnd,LPITEMIDLIST pidl, int iInsertId) ...@@ -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) ...@@ -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) ...@@ -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, ...@@ -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);
......
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