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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user