mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix refsvfs2 bug that counted uninitialized leak checking as enabled.
PiperOrigin-RevId: 465118656
This commit is contained in:
committed by
gVisor bot
parent
974792ae18
commit
1c220bf2a4
@@ -50,7 +50,8 @@ func init() {
|
||||
// LeakCheckEnabled returns whether leak checking is enabled. The following
|
||||
// functions should only be called if it returns true.
|
||||
func LeakCheckEnabled() bool {
|
||||
return refs_vfs1.GetLeakMode() != refs_vfs1.NoLeakChecking
|
||||
mode := refs_vfs1.GetLeakMode()
|
||||
return mode != refs_vfs1.NoLeakChecking && mode != refs_vfs1.UninitializedLeakChecking
|
||||
}
|
||||
|
||||
// leakCheckPanicEnabled returns whether DoLeakCheck() should panic when leaks
|
||||
|
||||
Reference in New Issue
Block a user