From c5caf52e5f843bced8c0c0d53e00386918718bf2 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Tue, 11 May 2010 22:51:45 +0000 Subject: [PATCH] fix for uninitialized variable --- src/common/node_select.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/common/node_select.c b/src/common/node_select.c index 1740452f00a..319596ee0d9 100644 --- a/src/common/node_select.c +++ b/src/common/node_select.c @@ -609,11 +609,11 @@ done: extern int slurm_select_fini(void) { - int rc, i, j; + int rc = SLURM_SUCCESS, i, j; slurm_mutex_lock(&select_context_lock); if (!select_context) - return SLURM_SUCCESS; + go to fini; for (i=0; i<select_context_cnt; i++) { j = _select_context_destroy(select_context); @@ -621,10 +621,9 @@ extern int slurm_select_fini(void) rc = j; } xfree(select_context); - select_context = NULL; select_context_cnt = -1; - slurm_mutex_unlock(&select_context_lock); +fini: slurm_mutex_unlock(&select_context_lock); return rc; } -- GitLab