From 281f5b39ce59b3e33ed69f53bc6898982e224a54 Mon Sep 17 00:00:00 2001
From: Danny Auble <da@schedmd.com>
Date: Mon, 19 Jun 2017 09:06:14 -0600
Subject: [PATCH] Fix Coverity issues caused by commit 250378c26a15.

Since you can no longer get into the code without there being a buffer there is
no reason to check it.
---
 src/common/assoc_mgr.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/common/assoc_mgr.c b/src/common/assoc_mgr.c
index ffbc81e92a6..ece5060dd15 100644
--- a/src/common/assoc_mgr.c
+++ b/src/common/assoc_mgr.c
@@ -5462,8 +5462,9 @@ unpack_error:
 	if (!ignore_state_errors)
 		fatal("Incomplete assoc usage state file, start with '-i' to ignore this");
 	error("Incomplete assoc usage state file");
-	if (buffer)
-		free_buf(buffer);
+
+	free_buf(buffer);
+
 	xfree(tmp_str);
 	assoc_mgr_unlock(&locks);
 	return SLURM_ERROR;
@@ -5577,8 +5578,9 @@ unpack_error:
 	if (!ignore_state_errors)
 		fatal("Incomplete QOS usage state file, start with '-i' to ignore this");
 	error("Incomplete QOS usage state file");
-	if (buffer)
-		free_buf(buffer);
+
+	free_buf(buffer);
+
 	if (itr)
 		list_iterator_destroy(itr);
 	xfree(tmp_str);
@@ -5786,8 +5788,9 @@ unpack_error:
 	if (!ignore_state_errors)
 		fatal("Incomplete assoc mgr state file, start with '-i' to ignore this");
 	error("Incomplete assoc mgr state file");
-	if (buffer)
-		free_buf(buffer);
+
+	free_buf(buffer);
+
 	assoc_mgr_unlock(&locks);
 	return SLURM_ERROR;
 }
-- 
GitLab