Correct CloseHandle() call.
authorIain Patterson <me@iain.cx>
Sun, 2 Mar 2014 11:48:56 +0000 (11:48 +0000)
committerIain Patterson <me@iain.cx>
Sun, 2 Mar 2014 18:23:04 +0000 (18:23 +0000)
Closing a service handle is done with CloseHandle() not
CloseServiceHandle().

service.cpp

index 898d987..3205dcc 100644 (file)
@@ -528,7 +528,7 @@ void cleanup_nssm_service(nssm_service_t *service) {
   }\r
   if (service->env) HeapFree(GetProcessHeap(), 0, service->env);\r
   if (service->env_extra) HeapFree(GetProcessHeap(), 0, service->env_extra);\r
-  if (service->handle) CloseServiceHandle(service->handle);\r
+  if (service->handle) CloseHandle(service->handle);\r
   if (service->process_handle) CloseHandle(service->process_handle);\r
   if (service->wait_handle) UnregisterWait(service->process_handle);\r
   if (service->throttle_section_initialised) DeleteCriticalSection(&service->throttle_section);\r