* Sync with trunk r64401.
[reactos.git] / base / applications / mscutils / servman / dependencies_tv2.c
index 65a1e75..3e2351e 100644 (file)
@@ -9,7 +9,6 @@
 
 #include "precomp.h"
 
-
 BOOL
 TV2_HasDependantServices(LPWSTR lpServiceName)
 {
@@ -42,6 +41,8 @@ TV2_HasDependantServices(LPWSTR lpServiceName)
                      bRet = TRUE;
                  }
             }
+
+            CloseServiceHandle(hService);
         }
 
         CloseServiceHandle(hSCManager);
@@ -50,7 +51,6 @@ TV2_HasDependantServices(LPWSTR lpServiceName)
     return bRet;
 }
 
-
 LPENUM_SERVICE_STATUS
 TV2_GetDependants(LPWSTR lpServiceName,
                   LPDWORD lpdwCount)
@@ -117,7 +117,6 @@ TV2_GetDependants(LPWSTR lpServiceName,
     return lpDependencies;
 }
 
-
 VOID
 TV2_AddDependantsToTree(PSERVICEPROPSHEET pDlgInfo,
                         HTREEITEM hParent,
@@ -166,9 +165,7 @@ TV2_AddDependantsToTree(PSERVICEPROPSHEET pDlgInfo,
                               0,
                               FALSE);
 
-            HeapFree(ProcessHeap,
-                     0,
-                     lpNoDepends);
+            LocalFree(lpNoDepends);
 
             /* Disable the window */
             EnableWindow(pDlgInfo->hDependsTreeView2, FALSE);