Skip to content

Commit 4691a4b

Browse files
committed
Fix resource leak reported by coverity scan report CID 1515756
Free env_str after use by opal_setenv. The opal_setenv function will copy the value as does the original setenv. Signed-off-by: Christoph Niethammer <niethammer@hlrs.de>
1 parent a992820 commit 4691a4b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ompi/tools/mpirun/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ static void setup_mca_prefixes(void)
110110
char *env_str = opal_argv_join(tmp, ',');
111111
opal_setenv("OMPI_MCA_PREFIXES", env_str, true,
112112
&environ);
113+
free(env_str);
113114

114115
opal_argv_free(tmp);
115116
}

0 commit comments

Comments
 (0)