Skip to content

Commit 950e080

Browse files
committed
Add missing free to mca_base_alias_register
Signed-off-by: Joseph Schuchart <schuchart@hlrs.de>
1 parent d310a20 commit 950e080

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

opal/mca/base/mca_base_alias.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,12 @@ int mca_base_alias_register (const char *project, const char *framework, const c
143143

144144
opal_hash_table_set_value_ptr (alias_hash_table, name, strlen(name), alias);
145145
free (name);
146+
name = NULL;
146147
}
147148

148149
mca_base_alias_item_t *alias_item = OBJ_NEW(mca_base_alias_item_t);
149150
if (NULL == alias_item) {
151+
if (NULL != name) free(name);
150152
return OPAL_ERR_OUT_OF_RESOURCE;
151153
}
152154

0 commit comments

Comments
 (0)