diff --git a/ipc/namespace.c b/ipc/namespace.c index 535f16e..ea3015c 100644 --- a/ipc/namespace.c +++ b/ipc/namespace.c @@ -201,7 +201,7 @@ static void free_ipc(struct work_struct *unused) */ void put_ipc_ns(struct ipc_namespace *ns) { - if (ns_ref_put_and_lock(ns, &mq_lock)) { + if (ns != NULL && ns_ref_put_and_lock(ns, &mq_lock)) { mq_clear_sbinfo(ns); spin_unlock(&mq_lock);