From 757a3169d5cdbbd439814b56a257f6f0cd94989b Mon Sep 17 00:00:00 2001
From: Danny Auble <da@schedmd.com>
Date: Tue, 30 May 2017 10:19:45 -0600
Subject: [PATCH] Reset variables if no qos exist.  Continuation of
 8129acfed78143 and others

---
 src/plugins/sched/backfill/backfill.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/plugins/sched/backfill/backfill.c b/src/plugins/sched/backfill/backfill.c
index 254d0970e64..3ad915e0f81 100644
--- a/src/plugins/sched/backfill/backfill.c
+++ b/src/plugins/sched/backfill/backfill.c
@@ -1149,10 +1149,15 @@ static int _attempt_backfill(void)
 		if (qos_ptr) {
 			qos_flags = qos_ptr->flags;
 			qos_blocked_until = qos_ptr->blocked_until;
+		} else {
+			qos_flags = 0;
+			qos_blocked_until = 0;
 		}
 
 		if (qos_part_ptr)
 			qos_part_blocked_until = qos_part_ptr->blocked_until;
+		else
+			qos_part_blocked_until = 0;
 
 		if (part_policy_valid_qos(job_ptr->part_ptr, qos_ptr) !=
 		    SLURM_SUCCESS) {
-- 
GitLab