Unverified Commit 6a40ccf5 by Christian Brauner Committed by Stéphane Graber

cgroups: use correct NULL pointer check

Fixes: Coverity 1461722. Fixes: Coverity 1461737. Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 9c0e2551
......@@ -514,7 +514,7 @@ bool bpf_devices_cgroup_supported(void)
"The bpf device cgroup requires real root");
prog = bpf_program_new(BPF_PROG_TYPE_CGROUP_DEVICE);
if (prog < 0)
if (!prog)
return log_trace(false, "Failed to allocate new bpf device cgroup program");
ret = bpf_program_add_instructions(prog, dummy, ARRAY_SIZE(dummy));
......
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