Skip to content
Snippets Groups Projects
Commit acc23d01 authored by Morris Jette's avatar Morris Jette
Browse files

Avoid possible invalid memory reference

parent 2dbdaa04
No related branches found
No related tags found
No related merge requests found
...@@ -127,7 +127,7 @@ const char proc_base_path[] = "/proc/fs/lustre/"; ...@@ -127,7 +127,7 @@ const char proc_base_path[] = "/proc/fs/lustre/";
/** /**
* is lustre fs supported * is lustre fs supported
**/ **/
static int _check_lustre_fs() static int _check_lustre_fs(void)
{ {
static bool set = false; static bool set = false;
static int rc = SLURM_SUCCESS; static int rc = SLURM_SUCCESS;
...@@ -147,8 +147,9 @@ static int _check_lustre_fs() ...@@ -147,8 +147,9 @@ static int _check_lustre_fs()
debug2("not able to read %s", debug2("not able to read %s",
lustre_directory); lustre_directory);
rc = SLURM_FAILURE; rc = SLURM_FAILURE;
} else {
closedir(proc_dir);
} }
closedir(proc_dir);
} else } else
rc = SLURM_ERROR; rc = SLURM_ERROR;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment