diff --git a/windows/svc/mgr/mgr.go b/windows/svc/mgr/mgr.go index 8d1cfd8b..33944d0f 100644 --- a/windows/svc/mgr/mgr.go +++ b/windows/svc/mgr/mgr.go @@ -137,7 +137,7 @@ func (m *Mgr) CreateService(name, exepath string, c Config, args ...string) (*Se err = updateSidType(h, c.SidType) if err != nil { windows.DeleteService(h) - windows.CloseHandle(h) + windows.CloseServiceHandle(h) return nil, err } } @@ -145,7 +145,7 @@ func (m *Mgr) CreateService(name, exepath string, c Config, args ...string) (*Se err = updateDescription(h, c.Description) if err != nil { windows.DeleteService(h) - windows.CloseHandle(h) + windows.CloseServiceHandle(h) return nil, err } } @@ -153,7 +153,7 @@ func (m *Mgr) CreateService(name, exepath string, c Config, args ...string) (*Se err = updateStartUp(h, c.DelayedAutoStart) if err != nil { windows.DeleteService(h) - windows.CloseHandle(h) + windows.CloseServiceHandle(h) return nil, err } }