From: Iain Patterson Date: Sun, 2 Mar 2014 11:48:56 +0000 (+0000) Subject: Correct CloseHandle() call. X-Git-Tag: v2.22~7 X-Git-Url: http://git.iain.cx/?p=nssm.git;a=commitdiff_plain;h=4e9901855cc3d6da15edca76ba199267bf1017b1 Correct CloseHandle() call. Closing a service handle is done with CloseHandle() not CloseServiceHandle(). --- diff --git a/service.cpp b/service.cpp index 898d987..3205dcc 100644 --- a/service.cpp +++ b/service.cpp @@ -528,7 +528,7 @@ void cleanup_nssm_service(nssm_service_t *service) { } if (service->env) HeapFree(GetProcessHeap(), 0, service->env); if (service->env_extra) HeapFree(GetProcessHeap(), 0, service->env_extra); - if (service->handle) CloseServiceHandle(service->handle); + if (service->handle) CloseHandle(service->handle); if (service->process_handle) CloseHandle(service->process_handle); if (service->wait_handle) UnregisterWait(service->process_handle); if (service->throttle_section_initialised) DeleteCriticalSection(&service->throttle_section);