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; } }