diff --git a/orte/mca/rmaps/base/rmaps_base_binding.c b/orte/mca/rmaps/base/rmaps_base_binding.c index eababd7e5b..cc831cc6b9 100644 --- a/orte/mca/rmaps/base/rmaps_base_binding.c +++ b/orte/mca/rmaps/base/rmaps_base_binding.c @@ -13,6 +13,8 @@ * Copyright (c) 2011-2012 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2013-2014 Intel, Inc. All rights reserved + * Copyright (c) 2015 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -277,6 +279,7 @@ static int bind_downwards(orte_job_t *jdata, locale = NULL; if (!orte_get_attribute(&proc->attributes, ORTE_PROC_HWLOC_LOCALE, (void**)&locale, OPAL_PTR)) { orte_show_help("help-orte-rmaps-base.txt", "rmaps:no-locale", true, ORTE_NAME_PRINT(&proc->name)); + hwloc_bitmap_free(totalcpuset); return ORTE_ERR_SILENT; } /* we don't know if the target is a direct child of this locale, @@ -674,7 +677,6 @@ int orte_rmaps_base_compute_bindings(orte_job_t *jdata) int i, rc; struct hwloc_topology_support *support; bool force_down = false; - hwloc_cpuset_t totalcpuset; int bind_depth, map_depth; opal_output_verbose(5, orte_rmaps_base_framework.framework_output, @@ -829,7 +831,6 @@ int orte_rmaps_base_compute_bindings(orte_job_t *jdata) */ execute: /* initialize */ - totalcpuset = hwloc_bitmap_alloc(); for (i=0; i < jdata->map->nodes->size; i++) { if (NULL == (node = (orte_node_t*)opal_pointer_array_get_item(jdata->map->nodes, i))) { @@ -853,7 +854,6 @@ int orte_rmaps_base_compute_bindings(orte_job_t *jdata) continue; } orte_show_help("help-orte-rmaps-base.txt", "rmaps:cpubind-not-supported", true, node->name); - hwloc_bitmap_free(totalcpuset); return ORTE_ERR_SILENT; } /* check if topology supports membind - have to be careful here @@ -872,7 +872,6 @@ int orte_rmaps_base_compute_bindings(orte_job_t *jdata) membind_warned = true; } else if (OPAL_HWLOC_BASE_MBFA_ERROR == opal_hwloc_base_mbfa) { orte_show_help("help-orte-rmaps-base.txt", "rmaps:membind-not-supported-fatal", true, node->name); - hwloc_bitmap_free(totalcpuset); return ORTE_ERR_SILENT; } } diff --git a/orte/mca/rmaps/base/rmaps_base_frame.c b/orte/mca/rmaps/base/rmaps_base_frame.c index 89a5c6d894..e66037db70 100644 --- a/orte/mca/rmaps/base/rmaps_base_frame.c +++ b/orte/mca/rmaps/base/rmaps_base_frame.c @@ -13,7 +13,7 @@ * Copyright (c) 2011-2013 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. - * Copyright (c) 2014 Research Organization for Information Science + * Copyright (c) 2014-2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -574,6 +574,7 @@ static int check_modifiers(char *ck, orte_mapping_policy_t *tmp) if (NULL == (ptr = strchr(ck2[i], '='))) { /* missing the value */ orte_show_help("help-orte-rmaps-base.txt", "missing-value", true, "pe", ck2[i]); + opal_argv_free(ck2); return ORTE_ERR_SILENT; } ptr++; @@ -875,6 +876,7 @@ int orte_rmaps_base_set_ranking_policy(orte_ranking_policy_t *policy, #endif } else { orte_show_help("help-orte-rmaps-base.txt", "unrecognized-policy", true, "ranking", rmaps_base_ranking_policy); + opal_argv_free(ck); return ORTE_ERR_SILENT; } opal_argv_free(ck);