Skip to content

Commit c5703b0

Browse files
author
David Wootton
committed
Fix memory leak in mca_base_alias_register
Signed-off-by: David Wootton <dwootton@us.ibm.com>
1 parent c74d333 commit c5703b0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

opal/mca/base/mca_base_alias.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ int mca_base_alias_register(const char *project, const char *framework, const ch
149149
if (NULL == alias) {
150150
alias = OBJ_NEW(mca_base_alias_t);
151151
if (NULL == alias) {
152+
if (NULL != name) {
153+
free(name);
154+
}
152155
return OPAL_ERR_OUT_OF_RESOURCE;
153156
}
154157

0 commit comments

Comments
 (0)