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 11/*
2- * Copyright © 2017-2022 Inria. All rights reserved.
2+ * Copyright © 2017-2023 Inria. All rights reserved.
33 * See COPYING in top-level directory.
44 */
55
@@ -227,6 +227,11 @@ hwloc_shmem_topology_adopt(hwloc_topology_t *topologyp,
227227 /* clear userdata callbacks pointing to the writer process' functions */
228228 new -> userdata_export_cb = NULL ;
229229 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 );
230235
231236#ifndef HWLOC_DEBUG
232237 if (getenv ("HWLOC_DEBUG_CHECK" ))
253258hwloc__topology_disadopt (hwloc_topology_t topology )
254259{
255260 hwloc_components_fini ();
261+ hwloc__free_infos (& topology -> infos );
256262 munmap (topology -> adopted_shmem_addr , topology -> adopted_shmem_length );
257263 free (topology -> support .discovery );
258264 free (topology -> support .cpubind );
You can’t perform that action at this time.
0 commit comments