From 9742b02856f81775a59256ca91f283be64591de2 Mon Sep 17 00:00:00 2001 From: rajasec Date: Wed, 1 Jun 2016 20:29:44 +0530 Subject: [PATCH] Removing the nil check for process label Signed-off-by: rajasec --- libcontainer/setns_init_linux.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libcontainer/setns_init_linux.go b/libcontainer/setns_init_linux.go index b1a198fd..825931a6 100644 --- a/libcontainer/setns_init_linux.go +++ b/libcontainer/setns_init_linux.go @@ -44,10 +44,8 @@ func (l *linuxSetnsInit) Init() error { if err := apparmor.ApplyProfile(l.config.AppArmorProfile); err != nil { return err } - if l.config.ProcessLabel != "" { - if err := label.SetProcessLabel(l.config.ProcessLabel); err != nil { - return err - } + if err := label.SetProcessLabel(l.config.ProcessLabel); err != nil { + return err } return system.Execv(l.config.Args[0], l.config.Args[0:], os.Environ()) }