Author: hbelusca
Date: Sun Feb 23 11:41:56 2014
New Revision: 62299
URL:
http://svn.reactos.org/svn/reactos?rev=62299&view=rev
Log:
[MSGINA]: Addendum for r62065 . I don't like freeing this 'msg' object in many
places (in the caller and in the thread).
Modified:
trunk/reactos/dll/win32/msgina/gui.c
Modified: trunk/reactos/dll/win32/msgina/gui.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/gui.c?rev…
==============================================================================
--- trunk/reactos/dll/win32/msgina/gui.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/gui.c [iso-8859-1] Sun Feb 23 11:41:56 2014
@@ -145,10 +145,20 @@
&ThreadId);
if (Thread)
{
+ /* 'msg' will be freed by 'StartupWindowThread' */
+
CloseHandle(Thread);
WaitForSingleObject(msg->StartupEvent, INFINITE);
CloseHandle(msg->StartupEvent);
return TRUE;
+ }
+ else
+ {
+ /*
+ * The 'StartupWindowThread' thread couldn't be created,
+ * so we need to free the allocated 'msg'.
+ */
+ HeapFree(GetProcessHeap(), 0, msg);
}
return FALSE;