Skip to content

Commit 90b508f

Browse files
committed
core/insert_group: free the group if merging with root
Don't leak that object in this special case. Signed-off-by: Brice Goglin <[email protected]>
1 parent d5059c6 commit 90b508f

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
@@ -2105,6 +2105,7 @@ hwloc_topology_insert_group_object(struct hwloc_topology *topology, hwloc_obj_t
21052105
res = hwloc__insert_object_by_cpuset(topology, NULL, obj, NULL /* do not show errors on stdout */);
21062106
} else {
21072107
/* just merge root */
2108+
hwloc_free_unlinked_object(obj);
21082109
res = root;
21092110
}
21102111

0 commit comments

Comments
 (0)