diff --git a/cmd/syncthing/cpuusage_windows.go b/cmd/syncthing/cpuusage_windows.go index 9aac2bf1..597c6f83 100644 --- a/cmd/syncthing/cpuusage_windows.go +++ b/cmd/syncthing/cpuusage_windows.go @@ -16,6 +16,7 @@ func cpuUsage() time.Duration { if err != nil { return 0 } + defer syscall.CloseHandle(handle) var ctime, etime, ktime, utime syscall.Filetime if err := syscall.GetProcessTimes(handle, &ctime, &etime, &ktime, &utime); err != nil {