浏览代码

fix memory leak

Samuel Thibault 9 年之前
父节点
当前提交
619f81bb87
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/core/topology.c

+ 3 - 0
src/core/topology.c

@@ -1229,6 +1229,9 @@ void _starpu_destroy_machine_config(struct _starpu_machine_config *config)
 	for(combined_worker_id=0 ; combined_worker_id < config->topology.ncombinedworkers ; combined_worker_id++)
 	{
 		struct _starpu_combined_worker *combined_worker = &config->combined_workers[combined_worker_id];
+#ifdef STARPU_HAVE_HWLOC
+		hwloc_bitmap_free(combined_worker->hwloc_cpu_set);
+#endif
 		free(combined_worker->perf_arch.devices);
 	}