1
1

orted/orted_submit: plug a memory leak

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Этот коммит содержится в:
Gilles Gouaillardet 2016-12-22 13:12:00 +09:00
родитель 189da7fdab
Коммит d54e54538a

Просмотреть файл

@ -588,7 +588,7 @@ int orte_submit_init(int argc, char *argv[],
void orte_submit_finalize(void)
{
trackr_t *trk;
int i;
int i, rc;
for (i=0; i < tool_jobs.size; i++) {
if (NULL != (trk = (trackr_t*)opal_pointer_array_get_item(&tool_jobs, i))) {
@ -597,6 +597,17 @@ void orte_submit_finalize(void)
}
OBJ_DESTRUCT(&tool_jobs);
/* close the SCHIZO framework */
if (ORTE_SUCCESS != (rc = mca_base_framework_close(&orte_schizo_base_framework))) {
ORTE_ERROR_LOG(rc);
return;
}
/* finalize only the util portion of OPAL */
if (OPAL_SUCCESS != (rc = opal_finalize_util())) {
return;
}
/* destruct the cmd line object */
if (NULL != orte_cmd_line) {
OBJ_RELEASE(orte_cmd_line);
@ -615,6 +626,12 @@ void orte_submit_finalize(void)
if (NULL != orte_cmd_options.prefix) {
free(orte_cmd_options.prefix);
}
if (NULL != orte_launch_environ) {
opal_argv_free(orte_launch_environ);
}
if (NULL != orte_basename) {
free(orte_basename);
}
}
int orte_submit_cancel(int index) {