From 8a5c8f4eacde77686c4a9e0df1639e6a3956eaa9 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Tue, 20 Dec 2011 14:56:22 +0000 Subject: [PATCH] [SYSSETUP] Fix memory leak svn path=/trunk/; revision=54707 --- reactos/dll/win32/syssetup/wizard.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/syssetup/wizard.c b/reactos/dll/win32/syssetup/wizard.c index 766c0b08784..b06f1e1de54 100644 --- a/reactos/dll/win32/syssetup/wizard.c +++ b/reactos/dll/win32/syssetup/wizard.c @@ -1806,19 +1806,20 @@ StartComponentRegistration(HWND hwndDlg, PULONG MaxProgress) RegistrationThread = NULL; RegistrationData = HeapAlloc(GetProcessHeap(), 0, sizeof(REGISTRATIONDATA)); - if (NULL != RegistrationData) + if (RegistrationData != NULL) { RegistrationData->hwndDlg = hwndDlg; RegistrationData->DllCount = DllCount; RegistrationThread = CreateThread(NULL, 0, RegistrationProc, (LPVOID) RegistrationData, 0, NULL); - if (NULL != RegistrationThread) + if (RegistrationThread != NULL) { CloseHandle(RegistrationThread); } else { DPRINT1("CreateThread failed, error %u\n", GetLastError()); + HeapFree(GetProcessHeap(), 0, RegistrationData); return FALSE; } }