diff --git a/orte/mca/ess/hnp/ess_hnp_module.c b/orte/mca/ess/hnp/ess_hnp_module.c index db864058c5..576843c62c 100644 --- a/orte/mca/ess/hnp/ess_hnp_module.c +++ b/orte/mca/ess/hnp/ess_hnp_module.c @@ -13,7 +13,7 @@ * Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights * reserved. - * Copyright (c) 2013-2016 Intel, Inc. All rights reserved. + * Copyright (c) 2013-2017 Intel, Inc. All rights reserved. * Copyright (c) 2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ @@ -854,7 +854,9 @@ static int rte_finalize(void) /* release the job hash table */ OPAL_HASH_TABLE_FOREACH(key, uint32, jdata, orte_job_data) { - OBJ_RELEASE(jdata); + if (NULL != jdata) { + OBJ_RELEASE(jdata); + } } OBJ_RELEASE(orte_job_data); diff --git a/orte/mca/iof/base/iof_base_frame.c b/orte/mca/iof/base/iof_base_frame.c index 9a372afaec..6511ba9268 100644 --- a/orte/mca/iof/base/iof_base_frame.c +++ b/orte/mca/iof/base/iof_base_frame.c @@ -11,7 +11,7 @@ * All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved. * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2015-2016 Intel, Inc. All rights reserved. + * Copyright (c) 2015-2017 Intel, Inc. All rights reserved. * Copyright (c) 2015-2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ @@ -90,8 +90,10 @@ static int orte_iof_base_close(void) } if (!ORTE_PROC_IS_DAEMON) { - OBJ_RELEASE(orte_iof_base.iof_write_stdout); - if (!orte_xml_output) { + if (NULL != orte_iof_base.iof_write_stdout) { + OBJ_RELEASE(orte_iof_base.iof_write_stdout); + } + if (!orte_xml_output && NULL != orte_iof_base.iof_write_stderr) { OBJ_RELEASE(orte_iof_base.iof_write_stderr); } } diff --git a/orte/mca/state/hnp/state_hnp.c b/orte/mca/state/hnp/state_hnp.c index 9b0ec11548..cfde613539 100644 --- a/orte/mca/state/hnp/state_hnp.c +++ b/orte/mca/state/hnp/state_hnp.c @@ -1,7 +1,7 @@ /* * Copyright (c) 2011-2012 Los Alamos National Security, LLC. * All rights reserved. - * Copyright (c) 2014 Intel, Inc. All rights reserved + * Copyright (c) 2014-2017 Intel, Inc. All rights reserved. * Copyright (c) 2017 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ @@ -189,8 +189,6 @@ static int init(void) static int finalize(void) { - opal_list_item_t *item; - /* cleanup the proc state machine */ OPAL_LIST_DESTRUCT(&orte_proc_states); /* cleanup the job state machine */