mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-02 03:48:26 +00:00
cmd/syncthing: Process handle should be closed
This commit is contained in:
parent
7931d956f7
commit
d25b15263a
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user