Skip to content

Commit 1e5b880

Browse files
author
David Wootton
committed
Fix memory use after free in dpm_convert
Coverity CID 1515770 Signed-off-by: David Wootton <dwootton@us.ibm.com>
1 parent 4dae142 commit 1e5b880

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

ompi/dpm/dpm.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -737,10 +737,7 @@ static int dpm_convert(opal_list_t *infos,
737737
if (0 != strncasecmp(ck, directive, strlen(directive))) {
738738
opal_asprintf(&help_str, "Conflicting directives \"%s %s\"", ck, directive);
739739
#if PMIX_NUMERIC_VERSION >= 0x00040000
740-
/* TODO: remove strdup if PMIx_Get_attribute_string takes const char* */
741-
char *option_dup = strdup(option);
742-
attr = PMIx_Get_attribute_string(option_dup);
743-
free(option_dup);
740+
attr = PMIx_Get_attribute_string(option);
744741
#else
745742
attr = option;
746743
#endif

0 commit comments

Comments
 (0)