Skip to content

Commit 602f833

Browse files
committed
Add missing OBJ_RELEASE to opal_reachable_allocate
Signed-off-by: Joseph Schuchart <schuchart@hlrs.de>
1 parent ae3974d commit 602f833

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

opal/mca/reachable/base/reachable_base_alloc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ opal_reachable_t * opal_reachable_allocate(unsigned int num_local,
4444
malloc, rather than a bunch of little allocations */
4545
memory = malloc(sizeof(int*) * num_local +
4646
num_local * (sizeof(int) * num_remote));
47-
if (memory == NULL) return NULL;
47+
if (memory == NULL) {
48+
OBJ_RELEASE(reachable);
49+
return NULL;
50+
}
4851

4952
reachable->memory = (void*)memory;
5053
reachable->weights = (int**)reachable->memory;

0 commit comments

Comments
 (0)