From 84a69b1ea4bb8995e0e563916acb0332fa1cf5f4 Mon Sep 17 00:00:00 2001 From: Hisham Date: Mon, 29 Feb 2016 21:57:27 -0300 Subject: [PATCH] Release resource when using hwloc --- ProcessList.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ProcessList.c b/ProcessList.c index 83e200eb..a49b4f12 100644 --- a/ProcessList.c +++ b/ProcessList.c @@ -108,6 +108,11 @@ ProcessList* ProcessList_init(ProcessList* this, ObjectClass* klass, UsersTable* } void ProcessList_done(ProcessList* this) { +#ifdef HAVE_LIBHWLOC + if (this->topologyOk) { + hwloc_topology_destroy(this->topology); + } +#endif Hashtable_delete(this->processTable); Vector_delete(this->processes); Vector_delete(this->processes2);