Author: pschweitzer
Date: Tue Dec 20 14:56:22 2011
New Revision: 54707
URL:
http://svn.reactos.org/svn/reactos?rev=54707&view=rev
Log:
[SYSSETUP]
Fix memory leak
Modified:
trunk/reactos/dll/win32/syssetup/wizard.c
Modified: trunk/reactos/dll/win32/syssetup/wizard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/wizard.…
==============================================================================
--- trunk/reactos/dll/win32/syssetup/wizard.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/syssetup/wizard.c [iso-8859-1] Tue Dec 20 14:56:22 2011
@@ -1806,19 +1806,20 @@
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;
}
}