From 7b2f115d24a915ad865c2596ec92cb69961c9f40 Mon Sep 17 00:00:00 2001 From: dmiller Date: Thu, 1 Sep 2016 03:34:20 +0000 Subject: [PATCH] Use CloseServiceHandle instead of CloseHandle to avoid debugging crash --- mswin32/winfix.cc | 4 ++-- nping/winfix.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mswin32/winfix.cc b/mswin32/winfix.cc index e240e1190..dbf73a9fe 100644 --- a/mswin32/winfix.cc +++ b/mswin32/winfix.cc @@ -223,9 +223,9 @@ Resorting to unprivileged (non-administrator) mode.", svcname, ret); quit_error: if (scm != NULL) - CloseHandle(scm); + CloseServiceHandle(scm); if (npf != NULL) - CloseHandle(npf); + CloseServiceHandle(npf); return false; } diff --git a/nping/winfix.cc b/nping/winfix.cc index e710157b8..a378d2840 100644 --- a/nping/winfix.cc +++ b/nping/winfix.cc @@ -223,9 +223,9 @@ Resorting to unprivileged (non-administrator) mode.", svcname, ret); quit_error: if (scm != NULL) - CloseHandle(scm); + CloseServiceHandle(scm); if (npf != NULL) - CloseHandle(npf); + CloseServiceHandle(npf); return false; }