cgroups: do not pass NULL pointer

Fixes: Coverity 1461752. Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 586a3fe8
...@@ -2736,6 +2736,9 @@ static int device_cgroup_rule_parse_devpath(struct device_item *device, ...@@ -2736,6 +2736,9 @@ static int device_cgroup_rule_parse_devpath(struct device_item *device,
return ret_set_errno(-1, EINVAL); return ret_set_errno(-1, EINVAL);
} }
if (!mode)
return ret_errno(EINVAL);
if (device_cgroup_parse_access(device, mode) < 0) if (device_cgroup_parse_access(device, mode) < 0)
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment