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; }