From 20d231defa9503e9f49ffa87430070b2d510d5eb Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Sat, 22 Dec 2018 03:37:06 -0800 Subject: [PATCH] odls_base_default_fns.c: put the free() in the right place Fixes CID 1441826. Signed-off-by: Jeff Squyres (cherry picked from commit f96c04244db6dbd7f3546d0d1d93e771933f4094) --- orte/mca/odls/base/odls_base_default_fns.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/orte/mca/odls/base/odls_base_default_fns.c b/orte/mca/odls/base/odls_base_default_fns.c index 4f3a77fce1..34b6268f60 100644 --- a/orte/mca/odls/base/odls_base_default_fns.c +++ b/orte/mca/odls/base/odls_base_default_fns.c @@ -13,7 +13,7 @@ * Copyright (c) 2011 Oak Ridge National Labs. All rights reserved. * Copyright (c) 2011-2013 Los Alamos National Security, LLC. * All rights reserved. - * Copyright (c) 2011-2017 Cisco Systems, Inc. All rights reserved + * Copyright (c) 2011-2018 Cisco Systems, Inc. All rights reserved * Copyright (c) 2013-2018 Intel, Inc. All rights reserved. * Copyright (c) 2014-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. @@ -632,21 +632,20 @@ int orte_odls_base_default_construct_child_list(opal_buffer_t *buffer, goto REPORT_ERROR; } } + free(ppn); + /* compute the ranks and add the proc objects * to the jdata->procs array */ if (ORTE_SUCCESS != (rc = orte_rmaps_base_compute_vpids(jdata))) { ORTE_ERROR_LOG(rc); - free(ppn); goto REPORT_ERROR; } /* and finally, compute the local and node ranks */ if (ORTE_SUCCESS != (rc = orte_rmaps_base_compute_local_ranks(jdata))) { ORTE_ERROR_LOG(rc); - free(ppn); goto REPORT_ERROR; } } - free(ppn); /* unpack the buffer containing any application setup info - there * might not be any, so it isn't an error if we don't find things */