1414 * et Automatique. All rights reserved.
1515 * Copyright (c) 2011-2012 Los Alamos National Security, LLC.
1616 * Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
17- * Copyright (c) 2014-2015 Research Organization for Information Science
17+ * Copyright (c) 2014-2016 Research Organization for Information Science
1818 * and Technology (RIST). All rights reserved.
1919 * Copyright (c) 2016 IBM Corporation. All rights reserved.
2020 * $COPYRIGHT$
@@ -854,7 +854,6 @@ void orte_plm_base_daemon_callback(int status, orte_process_name_t* sender,
854854 char * rml_uri = NULL , * ptr ;
855855 int rc , idx ;
856856 orte_proc_t * daemon = NULL ;
857- char * nodename ;
858857 orte_node_t * node ;
859858 orte_job_t * jdata ;
860859 orte_process_name_t dname ;
@@ -875,6 +874,7 @@ void orte_plm_base_daemon_callback(int status, orte_process_name_t* sender,
875874 /* multiple daemons could be in this buffer, so unpack until we exhaust the data */
876875 idx = 1 ;
877876 while (OPAL_SUCCESS == (rc = opal_dss .unpack (buffer , & dname , & idx , ORTE_NAME ))) {
877+ char * nodename ;
878878 /* unpack its contact info */
879879 idx = 1 ;
880880 if (ORTE_SUCCESS != (rc = opal_dss .unpack (buffer , & rml_uri , & idx , OPAL_STRING ))) {
@@ -1145,6 +1145,11 @@ void orte_plm_base_daemon_callback(int status, orte_process_name_t* sender,
11451145 ORTE_NAME_PRINT (& dname ),
11461146 (NULL == daemon ) ? "UNKNOWN" : daemon -> rml_uri ));
11471147
1148+ if (NULL != nodename ) {
1149+ free (nodename );
1150+ nodename = NULL ;
1151+ }
1152+
11481153 if (orted_failed_launch ) {
11491154 ORTE_ACTIVATE_JOB_STATE (jdatorted , ORTE_JOB_STATE_FAILED_TO_START );
11501155 return ;
@@ -1180,10 +1185,6 @@ void orte_plm_base_daemon_callback(int status, orte_process_name_t* sender,
11801185 }
11811186 }
11821187 }
1183- if (NULL != nodename ) {
1184- free (nodename );
1185- nodename = NULL ;
1186- }
11871188 idx = 1 ;
11881189 }
11891190 if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc ) {
0 commit comments