diff options
Diffstat (limited to 'pkg/sentry/control')
-rw-r--r-- | pkg/sentry/control/proc.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/control/proc.go b/pkg/sentry/control/proc.go index 106055e86..faf1168bb 100644 --- a/pkg/sentry/control/proc.go +++ b/pkg/sentry/control/proc.go @@ -278,8 +278,8 @@ func Processes(k *kernel.Kernel, containerID string, out *[]*Process) error { } ppid := kernel.ThreadID(0) - if tg.Leader().Parent() != nil { - ppid = ts.Root.IDOfThreadGroup(tg.Leader().Parent().ThreadGroup()) + if p := tg.Leader().Parent(); p != nil { + ppid = ts.Root.IDOfThreadGroup(p.ThreadGroup()) } *out = append(*out, &Process{ UID: tg.Leader().Credentials().EffectiveKUID, |