From ed223bbe4b654b3d941dc21d340d4e712d026c39 Mon Sep 17 00:00:00 2001
From: Danny Auble <da@schedmd.com>
Date: Wed, 25 Jun 2014 13:40:16 -0700
Subject: [PATCH] simpler code

---
 src/sacctmgr/file_functions.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/sacctmgr/file_functions.c b/src/sacctmgr/file_functions.c
index 249e89c92e9..b4ef54b3952 100644
--- a/src/sacctmgr/file_functions.c
+++ b/src/sacctmgr/file_functions.c
@@ -525,9 +525,9 @@ static sacctmgr_file_opts_t *_parse_options(char *options)
 	if (!file_opts->name) {
 		exit_code=1;
 		fprintf(stderr, " No name given\n");
-		_destroy_sacctmgr_file_opts(file_opts);
-		file_opts = NULL;
-	} else if (exit_code) {
+	}
+
+	if (exit_code) {
 		_destroy_sacctmgr_file_opts(file_opts);
 		file_opts = NULL;
 	}
-- 
GitLab