From 45566fa4e4bc55e870ae1d7f80778be8432bdef5 Mon Sep 17 00:00:00 2001 From: Ian Gudger Date: Fri, 28 Jun 2019 20:06:33 -0700 Subject: Add finalizer on AtomicRefCount to check for leaks. PiperOrigin-RevId: 255711454 --- pkg/sentry/fs/tty/terminal.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkg/sentry/fs/tty') diff --git a/pkg/sentry/fs/tty/terminal.go b/pkg/sentry/fs/tty/terminal.go index 8290f2530..b7cecb2ed 100644 --- a/pkg/sentry/fs/tty/terminal.go +++ b/pkg/sentry/fs/tty/terminal.go @@ -38,9 +38,11 @@ type Terminal struct { func newTerminal(ctx context.Context, d *dirInodeOperations, n uint32) *Terminal { termios := linux.DefaultSlaveTermios - return &Terminal{ + t := Terminal{ d: d, n: n, ld: newLineDiscipline(termios), } + t.EnableLeakCheck("tty.Terminal") + return &t } -- cgit v1.2.3