From 21d45b0807363789cf88669c8d0b9d590caea5ac Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Sat, 29 Oct 2011 01:55:19 +0000 Subject: [PATCH] Just some cleanup in case of error This commit was SVN r25387. --- opal/mca/hwloc/base/hwloc_base_dt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opal/mca/hwloc/base/hwloc_base_dt.c b/opal/mca/hwloc/base/hwloc_base_dt.c index 49b29ea81c..c3835b5b5c 100644 --- a/opal/mca/hwloc/base/hwloc_base_dt.c +++ b/opal/mca/hwloc/base/hwloc_base_dt.c @@ -77,12 +77,14 @@ int opal_hwloc_unpack(opal_buffer_t *buffer, void *dest, if (0 != hwloc_topology_set_flags(t, HWLOC_TOPOLOGY_FLAG_IS_THISSYSTEM)) { free(xmlbuffer); rc = OPAL_ERROR; + hwloc_topology_destroy(t); goto cleanup; } /* now load the topology */ if (0 != hwloc_topology_load(t)) { free(xmlbuffer); rc = OPAL_ERROR; + hwloc_topology_destroy(t); goto cleanup; } if (NULL != xmlbuffer) {