@@ -128,10 +128,8 @@ func addDevicesPlatform(ctx context.Context, sb *sandbox.Sandbox, containerConfi
128128 // if the device is not a device node
129129 // try to see if it's a directory holding many devices
130130 if err == devices .ErrNotADevice {
131-
132131 // check if it is a directory
133132 if e := utils .IsDirectory (path ); e == nil {
134-
135133 // mount the internal devices recursively
136134 // nolint: errcheck
137135 filepath .Walk (path , func (dpath string , f os.FileInfo , e error ) error {
@@ -428,7 +426,6 @@ func (s *Server) createSandboxContainer(ctx context.Context, containerID, contai
428426
429427 // set this container's apparmor profile if it is set by sandbox
430428 if s .appArmorEnabled && ! privileged {
431-
432429 appArmorProfileName := s .getAppArmorProfileName (containerConfig .GetLinux ().GetSecurityContext ().GetApparmorProfile ())
433430 if appArmorProfileName != "" {
434431 // reload default apparmor profile if it is unloaded.
@@ -446,7 +443,6 @@ func (s *Server) createSandboxContainer(ctx context.Context, containerID, contai
446443
447444 specgen .SetProcessApparmorProfile (appArmorProfileName )
448445 }
449-
450446 }
451447
452448 logPath := containerConfig .GetLogPath ()
@@ -1072,7 +1068,6 @@ func addOCIBindMounts(ctx context.Context, mountLabel string, containerConfig *p
10721068 Options : []string {"nosuid" , "noexec" , "nodev" , "relatime" , "ro" },
10731069 }
10741070 specgen .AddMount (m )
1075-
10761071 }
10771072
10781073 return volumes , ociMounts , nil
0 commit comments