plm/base: fix misc memory leaks
as reported by Coverity with CIDs 1196733 and 1196745
Этот коммит содержится в:
родитель
fa10025843
Коммит
2ab9a411f8
@ -14,7 +14,7 @@
|
|||||||
* et Automatique. All rights reserved.
|
* et Automatique. All rights reserved.
|
||||||
* Copyright (c) 2011-2012 Los Alamos National Security, LLC.
|
* Copyright (c) 2011-2012 Los Alamos National Security, LLC.
|
||||||
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
|
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
|
||||||
* Copyright (c) 2014 Research Organization for Information Science
|
* Copyright (c) 2014-2015 Research Organization for Information Science
|
||||||
* and Technology (RIST). All rights reserved.
|
* and Technology (RIST). All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
@ -996,6 +996,10 @@ void orte_plm_base_daemon_callback(int status, orte_process_name_t* sender,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (NULL != nodename) {
|
||||||
|
free(nodename);
|
||||||
|
nodename = NULL;
|
||||||
|
}
|
||||||
idx = 1;
|
idx = 1;
|
||||||
}
|
}
|
||||||
if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc) {
|
if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc) {
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* Copyright (c) 2011-2012 Los Alamos National Security, LLC.
|
* Copyright (c) 2011-2012 Los Alamos National Security, LLC.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
|
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
|
||||||
|
* Copyright (c) 2015 Research Organization for Information Science
|
||||||
|
* and Technology (RIST). All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -311,6 +313,7 @@ int orte_plm_base_fork_hnp(void)
|
|||||||
jobid = ORTE_DAEMON_JOBID(ORTE_PROC_MY_NAME->jobid);
|
jobid = ORTE_DAEMON_JOBID(ORTE_PROC_MY_NAME->jobid);
|
||||||
if (ORTE_SUCCESS != (rc = orte_util_convert_jobid_to_string(¶m, jobid))) {
|
if (ORTE_SUCCESS != (rc = orte_util_convert_jobid_to_string(¶m, jobid))) {
|
||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
|
free(cmd);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
opal_argv_append(&argc, &argv, param);
|
opal_argv_append(&argc, &argv, param);
|
||||||
@ -364,6 +367,7 @@ int orte_plm_base_fork_hnp(void)
|
|||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
free(cmd);
|
||||||
/* I am the parent - wait to hear something back and
|
/* I am the parent - wait to hear something back and
|
||||||
* report results
|
* report results
|
||||||
*/
|
*/
|
||||||
@ -430,11 +434,12 @@ int orte_plm_base_fork_hnp(void)
|
|||||||
if (ORTE_SUCCESS != (rc = orte_rml_base_parse_uris(orte_process_info.my_daemon_uri,
|
if (ORTE_SUCCESS != (rc = orte_rml_base_parse_uris(orte_process_info.my_daemon_uri,
|
||||||
ORTE_PROC_MY_DAEMON, NULL))) {
|
ORTE_PROC_MY_DAEMON, NULL))) {
|
||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
|
free(orted_uri);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* likewise, since this is also the HNP, set that uri too */
|
/* likewise, since this is also the HNP, set that uri too */
|
||||||
orte_process_info.my_hnp_uri = strdup(orted_uri);
|
orte_process_info.my_hnp_uri = orted_uri;
|
||||||
orte_rml.set_contact_info(orte_process_info.my_hnp_uri);
|
orte_rml.set_contact_info(orte_process_info.my_hnp_uri);
|
||||||
if (ORTE_SUCCESS != (rc = orte_rml_base_parse_uris(orte_process_info.my_hnp_uri,
|
if (ORTE_SUCCESS != (rc = orte_rml_base_parse_uris(orte_process_info.my_hnp_uri,
|
||||||
ORTE_PROC_MY_HNP, NULL))) {
|
ORTE_PROC_MY_HNP, NULL))) {
|
||||||
@ -457,7 +462,6 @@ int orte_plm_base_fork_hnp(void)
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
/* all done - report success */
|
/* all done - report success */
|
||||||
free(orted_uri);
|
|
||||||
return ORTE_SUCCESS;
|
return ORTE_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user