- Fix leaking 'pSetupData' in case of failure. CID 1363604
- Since we know that in the remaining of the code, 'pSetupData' is a valid pointer, we can free it at the very end without rechecking whether it was NULL or not.
CORE-11591 #resolve

svn path=/trunk/; revision=71927
This commit is contained in:
Hermès Bélusca-Maïto 2016-07-13 16:33:37 +00:00
parent 368ccec209
commit d512139905

View file

@ -788,7 +788,10 @@ _tWinMain(HINSTANCE hInst,
if (!pSetupData->bUnattend)
{
if (!LoadSetupData(pSetupData))
{
HeapFree(GetProcessHeap(), 0, pSetupData);
return 0;
}
/* Create the Start page, until setup is working */
psp.dwSize = sizeof(PROPSHEETPAGE);
@ -881,8 +884,7 @@ _tWinMain(HINSTANCE hInst,
if (pSetupData->hTitleFont)
DeleteObject(pSetupData->hTitleFont);
if (pSetupData != NULL)
HeapFree(GetProcessHeap(), 0, pSetupData);
HeapFree(GetProcessHeap(), 0, pSetupData);
#if 0
EnableShutdownPrivilege();