mirror of
https://github.com/containers/podman.git
synced 2026-10-20 00:52:58 -04:00
Fix panic condition in cgroups.getAvailableControllers
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
This commit is contained in:
1 parent
e549ca5078
commit
fc9868e224
1 file changed
+2
-3
@@ -165,14 +165,13 @@ func getAvailableControllers(exclude map[string]controllerHandler, cgroup2 bool)
|
||||
if _, found := exclude[name]; found {
|
||||
continue
|
||||
}
|
||||
isSymLink := false
|
||||
fileInfo, err := os.Stat(cgroupRoot + "/" + name)
|
||||
if err != nil {
|
||||
isSymLink = !fileInfo.IsDir()
|
||||
continue
|
||||
}
|
||||
c := controller{
|
||||
name: name,
|
||||
symlink: isSymLink,
|
||||
symlink: !fileInfo.IsDir(),
|
||||
}
|
||||
controllers = append(controllers, c)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user