-fix a memory leak
authorChristoph von Wittich <christoph_vw@reactos.org>
Mon, 9 Jul 2007 02:02:30 +0000 (02:02 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Mon, 9 Jul 2007 02:02:30 +0000 (02:02 +0000)
svn path=/trunk/; revision=27530

reactos/dll/win32/advapi32/service/sctrl.c

index bf5e7d2..8310a83 100644 (file)
@@ -177,7 +177,12 @@ ScServiceMainStub(LPVOID Context)
                                 0,
                                 (dwArgCount + 1) * sizeof(LPSTR));
         if (lpArgVector == NULL)
+        {
+            HeapFree(GetProcessHeap(),
+                        0,
+                        AnsiString);
             return ERROR_OUTOFMEMORY;
+        }
 
         dwArgCount = 0;
         Ptr = AnsiString;