2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

ns: don't dereference a null pointer

CID 181219 (#1 of 1): Dereference null return value (NULL_RETURNS)
3. dereference: Dereferencing a null pointer ns.
This commit is contained in:
Andrei Vagin
2018-02-08 21:15:34 +03:00
parent edb5da271d
commit 5ab6836b0c

View File

@@ -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) {