From 8468ad5cf4c14c36729bb5a63ad2976f6ff32cbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 20 May 2018 20:35:56 +0200 Subject: [PATCH] [SYSSETUP] Delete the created fonts when needed. --- dll/win32/syssetup/wizard.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dll/win32/syssetup/wizard.c b/dll/win32/syssetup/wizard.c index aa26296af0b..2eafef78745 100644 --- a/dll/win32/syssetup/wizard.c +++ b/dll/win32/syssetup/wizard.c @@ -2655,6 +2655,9 @@ InstallWizard(VOID) } } + DeleteObject(pSetupData->hBoldFont); + DeleteObject(pSetupData->hTitleFont); + if (pSetupData->hUnattendedInf != INVALID_HANDLE_VALUE) SetupCloseInfFile(pSetupData->hUnattendedInf); @@ -2666,11 +2669,7 @@ done: FreeLibrary(hNetShell); if (pSetupData != NULL) - { - DeleteObject(pSetupData->hBoldFont); - DeleteObject(pSetupData->hTitleFont); HeapFree(GetProcessHeap(), 0, pSetupData); - } LogItem(L"END_SECTION", L"InstallWizard"); }