[CRIU] [PATCH 6/8] ns: don't dereference a null pointer
Andrei Vagin
avagin at openvz.org
Fri Feb 16 10:21:18 MSK 2018
[This sender failed our fraud detection checks and may not be who they appear to be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing]
From: Andrei Vagin <avagin at virtuozzo.com>
CID 181219 (#1 of 1): Dereference null return value (NULL_RETURNS)
3. dereference: Dereferencing a null pointer ns.
Signed-off-by: Andrei Vagin <avagin at virtuozzo.com>
---
criu/namespaces.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/criu/namespaces.c b/criu/namespaces.c
index e7c553403..c393ccea4 100644
--- a/criu/namespaces.c
+++ b/criu/namespaces.c
@@ -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) {
--
2.13.6
More information about the CRIU
mailing list