From a370d6b853ce7c4ef8c881cde4b9dc0bd9cd8b19 Mon Sep 17 00:00:00 2001 From: Morris Jette <jette@schedmd.com> Date: Wed, 9 Nov 2016 14:59:47 -0700 Subject: [PATCH] Fix for possibly NULL pointer as reported by Coverity --- src/slurmctld/proc_req.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 36fd0fb296c..a8dd113e6dd 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -5518,7 +5518,7 @@ inline static void _slurm_rpc_reboot_nodes(slurm_msg_t * msg) continue; } node_ptr->node_state |= NODE_STATE_REBOOT; - if (reboot_msg->flags & REBOOT_FLAGS_ASAP) { + if (reboot_msg && (reboot_msg->flags & REBOOT_FLAGS_ASAP)) { node_ptr->node_state |= NODE_STATE_DRAIN; if (node_ptr->reason == NULL) { node_ptr->reason = xstrdup("Reboot ASAP"); -- GitLab