Skip to content

Commit

Permalink
cgroup.go: avoid panic on nil interface
Browse files Browse the repository at this point in the history
Signed-off-by: linrunlong <[email protected]>
  • Loading branch information
linrl3 committed Sep 8, 2021
1 parent ddda8a1 commit 6aeb1eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ func (c *cgroup) Tasks(subsystem Name, recursive bool) ([]Task, error) {

func (c *cgroup) processes(subsystem Name, recursive bool, pType procType) ([]Process, error) {
s := c.getSubsystem(subsystem)
if s == nil {
return nil, ErrControllerNotActive
}
sp, err := c.path(subsystem)
if err != nil {
return nil, err
Expand Down

0 comments on commit 6aeb1eb

Please sign in to comment.