mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[SETUP]
- 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:
parent
368ccec209
commit
d512139905
1 changed files with 4 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue