Author: cwittich
Date: Mon Jul 9 06:02:30 2007
New Revision: 27530
URL:
http://svn.reactos.org/svn/reactos?rev=27530&view=rev
Log:
-fix a memory leak
Modified:
trunk/reactos/dll/win32/advapi32/service/sctrl.c
Modified: trunk/reactos/dll/win32/advapi32/service/sctrl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/service/sctrl.c (original)
+++ trunk/reactos/dll/win32/advapi32/service/sctrl.c Mon Jul 9 06:02:30 2007
@@ -177,7 +177,12 @@
0,
(dwArgCount + 1) * sizeof(LPSTR));
if (lpArgVector == NULL)
+ {
+ HeapFree(GetProcessHeap(),
+ 0,
+ AnsiString);
return ERROR_OUTOFMEMORY;
+ }
dwArgCount = 0;
Ptr = AnsiString;