Merge pull request #1722 from uubulb/fix_windows_mem

fix(mem): possible memory leak on Windows
pull/1737/head
shirou 7 months ago committed by GitHub
commit 44c71b62c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -82,6 +82,8 @@ func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) {
if err != nil {
return nil, err
}
defer common.PdhCloseQuery.Call(uintptr(counter.Query))
usedPercent, err := counter.GetValue()
if err != nil {
return nil, err

Loading…
Cancel
Save