Skip to content

Commit 93e4935

Browse files
author
Ralph Castain
committed
Be a tad more cautious before releasing objects when running in DVM mode
Fixes #2700 Signed-off-by: Ralph Castain <[email protected]>
1 parent 3593fad commit 93e4935

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

orte/mca/ess/hnp/ess_hnp_module.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved.
1414
* Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights
1515
* reserved.
16-
* Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
16+
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
1717
* Copyright (c) 2017 Research Organization for Information Science
1818
* and Technology (RIST). All rights reserved.
1919
* $COPYRIGHT$
@@ -854,7 +854,9 @@ static int rte_finalize(void)
854854

855855
/* release the job hash table */
856856
OPAL_HASH_TABLE_FOREACH(key, uint32, jdata, orte_job_data) {
857-
OBJ_RELEASE(jdata);
857+
if (NULL != jdata) {
858+
OBJ_RELEASE(jdata);
859+
}
858860
}
859861
OBJ_RELEASE(orte_job_data);
860862

orte/mca/iof/base/iof_base_frame.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* All rights reserved.
1212
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights reserved.
1313
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
14-
* Copyright (c) 2015-2016 Intel, Inc. All rights reserved.
14+
* Copyright (c) 2015-2017 Intel, Inc. All rights reserved.
1515
* Copyright (c) 2015-2017 Research Organization for Information Science
1616
* and Technology (RIST). All rights reserved.
1717
* $COPYRIGHT$
@@ -90,8 +90,10 @@ static int orte_iof_base_close(void)
9090
}
9191

9292
if (!ORTE_PROC_IS_DAEMON) {
93-
OBJ_RELEASE(orte_iof_base.iof_write_stdout);
94-
if (!orte_xml_output) {
93+
if (NULL != orte_iof_base.iof_write_stdout) {
94+
OBJ_RELEASE(orte_iof_base.iof_write_stdout);
95+
}
96+
if (!orte_xml_output && NULL != orte_iof_base.iof_write_stderr) {
9597
OBJ_RELEASE(orte_iof_base.iof_write_stderr);
9698
}
9799
}

orte/mca/state/hnp/state_hnp.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Copyright (c) 2011-2012 Los Alamos National Security, LLC.
33
* All rights reserved.
4-
* Copyright (c) 2014 Intel, Inc. All rights reserved
4+
* Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
55
* Copyright (c) 2017 Research Organization for Information Science
66
* and Technology (RIST). All rights reserved.
77
* $COPYRIGHT$
@@ -189,8 +189,6 @@ static int init(void)
189189

190190
static int finalize(void)
191191
{
192-
opal_list_item_t *item;
193-
194192
/* cleanup the proc state machine */
195193
OPAL_LIST_DESTRUCT(&orte_proc_states);
196194
/* cleanup the job state machine */

0 commit comments

Comments
 (0)