Author: cwittich
Date: Mon Jul 9 05:52:35 2007
New Revision: 27529
URL:
http://svn.reactos.org/svn/reactos?rev=27529&view=rev
Log:
-fix a memory leak
Modified:
trunk/reactos/base/system/services/rpcserver.c
trunk/reactos/base/system/services/services.c
Modified: trunk/reactos/base/system/services/rpcserver.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/rpcse…
==============================================================================
--- trunk/reactos/base/system/services/rpcserver.c (original)
+++ trunk/reactos/base/system/services/rpcserver.c Mon Jul 9 05:52:35 2007
@@ -1225,7 +1225,7 @@
else
{
/* Release the display name buffer */
- if (lpService->lpServiceName != lpService->lpDisplayName)
+ if (lpService->lpServiceName != NULL)
HeapFree(GetProcessHeap(), 0, lpService->lpDisplayName);
if (hServiceHandle != NULL)
Modified: trunk/reactos/base/system/services/services.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/servi…
==============================================================================
--- trunk/reactos/base/system/services/services.c (original)
+++ trunk/reactos/base/system/services/services.c Mon Jul 9 05:52:35 2007
@@ -369,7 +369,8 @@
#if 1
hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
- WaitForSingleObject(hEvent, INFINITE);
+ if (hEvent)
+ WaitForSingleObject(hEvent, INFINITE);
#else
for (;;)
{