From 12daecb826765c64ba046bb3640bf2844b389e06 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Sat, 3 Sep 2005 01:22:11 +0000 Subject: [PATCH] More cleanup This commit was SVN r7167. --- orte/mca/rds/hostfile/rds_hostfile.c | 22 +++++++++------------- orte/tools/orterun/orterun.c | 2 ++ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/orte/mca/rds/hostfile/rds_hostfile.c b/orte/mca/rds/hostfile/rds_hostfile.c index 2d15409e2c..f54ad56c70 100644 --- a/orte/mca/rds/hostfile/rds_hostfile.c +++ b/orte/mca/rds/hostfile/rds_hostfile.c @@ -262,6 +262,9 @@ static int orte_rds_hostfile_query(void) opal_list_t existing; opal_list_t updates, rds_updates; opal_list_item_t *item; + orte_rds_cell_desc_t *rds_item; + orte_rds_cell_attr_t *new_attr; + orte_ras_node_t *ras_item; int rc; OBJ_CONSTRUCT(&existing, opal_list_t); @@ -288,16 +291,11 @@ static int orte_rds_hostfile_query(void) } if ( !opal_list_is_empty(&updates) ) { - orte_rds_cell_desc_t *rds_item; - orte_rds_cell_attr_t *new_attr; - orte_ras_node_t *ras_item; - opal_list_item_t *item; /* Convert RAS update list to RDS update list */ - for ( item = opal_list_get_first(&updates); - item != opal_list_get_end( &updates); - item = opal_list_get_next( item)) { - ras_item = (orte_ras_node_t *) item; + for ( ras_item = (orte_ras_node_t*)opal_list_get_first(&updates); + ras_item != (orte_ras_node_t*)opal_list_get_end(&updates); + ras_item = (orte_ras_node_t*)opal_list_get_next(ras_item)) { rds_item = OBJ_NEW(orte_rds_cell_desc_t); if (NULL == rds_item) { @@ -376,11 +374,9 @@ cleanup: OBJ_RELEASE(item); } - while(NULL != (item = opal_list_remove_first(&rds_updates))) { - orte_rds_cell_desc_t *rds_item; - rds_item = (orte_rds_cell_desc_t *) item; - while (NULL != (item = opal_list_remove_first(&(rds_item->attributes))) ) { - OBJ_RELEASE(item); + while (NULL != (rds_item = (orte_rds_cell_desc_t*)opal_list_remove_first(&rds_updates))) { + while (NULL != (new_attr = (orte_rds_cell_attr_t*)opal_list_remove_first(&(rds_item->attributes)))) { + OBJ_RELEASE(new_attr); } OBJ_RELEASE(rds_item); } diff --git a/orte/tools/orterun/orterun.c b/orte/tools/orterun/orterun.c index 933462573c..48103a235c 100644 --- a/orte/tools/orterun/orterun.c +++ b/orte/tools/orterun/orterun.c @@ -406,6 +406,7 @@ int orterun(int argc, char *argv[]) orte_finalize(); free(abort_msg); free(orterun_basename); + free(proc_infos); return rc; } @@ -521,6 +522,7 @@ static void dump_aborted_procs(orte_jobid_t jobid) if (NULL != values) { free(values); } + free(segment); }