diff --git a/dlls/commdlg/filedlg95.c b/dlls/commdlg/filedlg95.c index 533474e6b04..27480e7dfd9 100644 --- a/dlls/commdlg/filedlg95.c +++ b/dlls/commdlg/filedlg95.c @@ -2384,7 +2384,7 @@ static int FILEDLG95_LOOKIN_AddItem(HWND hwnd,LPITEMIDLIST pidl, int iInsertId) tmpFolder->m_iIndent++; } - tmpFolder->pidlItem = COMDLG32_PIDL_ILClone(pidl); /* FIXME: memory leak*/ + tmpFolder->pidlItem = COMDLG32_PIDL_ILClone(pidl); if(tmpFolder->m_iIndent > liInfos->iMaxIndentation) liInfos->iMaxIndentation = tmpFolder->m_iIndent; @@ -2420,6 +2420,7 @@ static int FILEDLG95_LOOKIN_AddItem(HWND hwnd,LPITEMIDLIST pidl, int iInsertId) return iItemID; } + COMDLG32_SHFree( tmpFolder->pidlItem ); MemFree( tmpFolder ); return -1; diff --git a/dlls/commdlg/filedlgbrowser.c b/dlls/commdlg/filedlgbrowser.c index 8399c0f01d8..4460a0ccbf3 100644 --- a/dlls/commdlg/filedlgbrowser.c +++ b/dlls/commdlg/filedlgbrowser.c @@ -228,7 +228,7 @@ ULONG WINAPI IShellBrowserImpl_Release(IShellBrowser * iface) if (!--(This->ref)) { - HeapFree(GetProcessHeap(),0, This); + COMDLG32_SHFree(This); TRACE("-- destroyed\n"); return 0; } @@ -306,7 +306,10 @@ HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *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);