File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright © 2017-2022 Inria. All rights reserved.
2
+ * Copyright © 2017-2023 Inria. All rights reserved.
3
3
* See COPYING in top-level directory.
4
4
*/
5
5
@@ -227,6 +227,11 @@ hwloc_shmem_topology_adopt(hwloc_topology_t *topologyp,
227
227
/* clear userdata callbacks pointing to the writer process' functions */
228
228
new -> userdata_export_cb = NULL ;
229
229
new -> userdata_import_cb = NULL ;
230
+ /* duplicate topo infos so that we can modify them */
231
+ new -> infos .array = NULL ;
232
+ new -> infos .count = 0 ;
233
+ new -> infos .allocated = 0 ;
234
+ hwloc__tma_dup_infos (NULL , & new -> infos , & old -> infos );
230
235
231
236
#ifndef HWLOC_DEBUG
232
237
if (getenv ("HWLOC_DEBUG_CHECK" ))
253
258
hwloc__topology_disadopt (hwloc_topology_t topology )
254
259
{
255
260
hwloc_components_fini ();
261
+ hwloc__free_infos (& topology -> infos );
256
262
munmap (topology -> adopted_shmem_addr , topology -> adopted_shmem_length );
257
263
free (topology -> support .discovery );
258
264
free (topology -> support .cpubind );
You can’t perform that action at this time.
0 commit comments