From 65d80bd0d20e36bc0e704de8f7280f165bf8148d Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Fri, 17 Sep 2010 20:17:32 +0000
Subject: [PATCH] plug tiny memory leak in slurmd/gres (just on reconfig)

---
 src/common/gres.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/common/gres.c b/src/common/gres.c
index 4bbf4b89268..84a6265d6da 100644
--- a/src/common/gres.c
+++ b/src/common/gres.c
@@ -751,12 +751,13 @@ extern int gres_plugin_node_config_load(uint32_t cpu_cnt)
 	struct stat config_stat;
 	s_p_hashtbl_t *tbl;
 	gres_slurmd_conf_t **gres_array;
-	char *gres_conf_file = _get_gres_conf();
+	char *gres_conf_file;
 
 	rc = gres_plugin_init();
 	if (gres_context_cnt == 0)
 		return SLURM_SUCCESS;
 
+	gres_conf_file = _get_gres_conf();
 	slurm_mutex_lock(&gres_context_lock);
 	gres_cpu_cnt = cpu_cnt;
 	if (stat(gres_conf_file, &config_stat) < 0)
-- 
GitLab