Skip to content

Commit

Permalink
ns: don't dereference a null pointer
Browse files Browse the repository at this point in the history
CID 181219 (#1 of 1): Dereference null return value (NULL_RETURNS)
3. dereference: Dereferencing a null pointer ns.
  • Loading branch information
avagin committed Feb 16, 2018
1 parent edb5da2 commit 5ab6836
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions criu/namespaces.c
Original file line number Diff line number Diff line change
Expand Up @@ -2667,6 +2667,7 @@ static int do_create_pid_ns_helper(void *arg, int sk, pid_t unused_pid)

ns_reaper = *(struct pstree_item **)arg;
ns = lookup_ns_by_id(ns_reaper->ids->pid_ns_id, &pid_ns_desc);
BUG_ON(ns == NULL);

pid = __pstree_pid_by_virt(ns, ns->ns_pid);
if (!pid) {
Expand Down

0 comments on commit 5ab6836

Please sign in to comment.