Skip to content

Commit d5059c6

Browse files
committed
core/insert_group: free the input object if failing to insert because shmem topo
Signed-off-by: Brice Goglin <[email protected]>
1 parent e22f340 commit d5059c6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

hwloc/topology.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2051,6 +2051,7 @@ hwloc_topology_insert_group_object(struct hwloc_topology *topology, hwloc_obj_t
20512051
return NULL;
20522052
}
20532053
if (topology->adopted_shmem_addr) {
2054+
hwloc_free_unlinked_object(obj);
20542055
errno = EPERM;
20552056
return NULL;
20562057
}

0 commit comments

Comments
 (0)