shell32: Fix a mem leak in SHBrowseForFolder.

oldstable
Diaa Sami 2009-01-29 19:54:29 +00:00 committed by Alexandre Julliard
parent 8ca2aa3da9
commit 72a7aed5b6
1 changed files with 14 additions and 0 deletions

View File

@ -801,6 +801,17 @@ static BOOL BrsFolder_OnWindowPosChanging(browse_info *info, WINDOWPOS *pos)
return 0;
}
static INT BrsFolder_OnDestroy(browse_info *info)
{
if (info->layout)
{
SHFree(info->layout);
info->layout = NULL;
}
return 0;
}
/*************************************************************************
* BrsFolderDlgProc32 (not an exported API function)
*/
@ -860,6 +871,9 @@ static INT_PTR CALLBACK BrsFolderDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
case BFFM_SETEXPANDED: /* unicode only */
return BrsFolder_OnSetExpanded(info, (LPVOID)lParam, (BOOL)wParam, NULL);
case WM_DESTROY:
return BrsFolder_OnDestroy(info);
}
return FALSE;
}