Clean up a minor memory leak
This commit was SVN r9413.
Этот коммит содержится в:
родитель
29c70291a9
Коммит
a843ce4c23
@ -839,11 +839,9 @@ static int parse_locals(int argc, char* argv[])
|
|||||||
opal_argv_free(env);
|
opal_argv_free(env);
|
||||||
env = NULL;
|
env = NULL;
|
||||||
}
|
}
|
||||||
app = OBJ_NEW(orte_app_context_t);
|
app = NULL;
|
||||||
rc = create_app(temp_argc, temp_argv, &app, &made_app, &env);
|
rc = create_app(temp_argc, temp_argv, &app, &made_app, &env);
|
||||||
/** keep track of the number of apps - point this app_context to that index */
|
/** keep track of the number of apps - point this app_context to that index */
|
||||||
app->idx = app_num;
|
|
||||||
app_num++;
|
|
||||||
if (ORTE_SUCCESS != rc) {
|
if (ORTE_SUCCESS != rc) {
|
||||||
/* Assume that the error message has already been
|
/* Assume that the error message has already been
|
||||||
printed; no need to cleanup -- we can just
|
printed; no need to cleanup -- we can just
|
||||||
@ -852,9 +850,9 @@ static int parse_locals(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
if (made_app) {
|
if (made_app) {
|
||||||
size_t dummy;
|
size_t dummy;
|
||||||
|
app->idx = app_num;
|
||||||
|
++app_num;
|
||||||
orte_pointer_array_add(&dummy, apps_pa, app);
|
orte_pointer_array_add(&dummy, apps_pa, app);
|
||||||
} else {
|
|
||||||
OBJ_RELEASE(app);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reset the temps */
|
/* Reset the temps */
|
||||||
@ -869,10 +867,8 @@ static int parse_locals(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (opal_argv_count(temp_argv) > 1) {
|
if (opal_argv_count(temp_argv) > 1) {
|
||||||
app = OBJ_NEW(orte_app_context_t);
|
app = NULL;
|
||||||
rc = create_app(temp_argc, temp_argv, &app, &made_app, &env);
|
rc = create_app(temp_argc, temp_argv, &app, &made_app, &env);
|
||||||
app->idx = app_num;
|
|
||||||
app_num++;
|
|
||||||
if (ORTE_SUCCESS != rc) {
|
if (ORTE_SUCCESS != rc) {
|
||||||
/* Assume that the error message has already been printed;
|
/* Assume that the error message has already been printed;
|
||||||
no need to cleanup -- we can just exit */
|
no need to cleanup -- we can just exit */
|
||||||
@ -880,9 +876,9 @@ static int parse_locals(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
if (made_app) {
|
if (made_app) {
|
||||||
size_t dummy;
|
size_t dummy;
|
||||||
|
app->idx = app_num;
|
||||||
|
++app_num;
|
||||||
orte_pointer_array_add(&dummy, apps_pa, app);
|
orte_pointer_array_add(&dummy, apps_pa, app);
|
||||||
} else {
|
|
||||||
OBJ_RELEASE(app);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (NULL != env) {
|
if (NULL != env) {
|
||||||
@ -1402,8 +1398,6 @@ static int parse_appfile(char *filename, char ***env)
|
|||||||
}
|
}
|
||||||
|
|
||||||
rc = create_app(argc, argv, &app, &made_app, &tmp_env);
|
rc = create_app(argc, argv, &app, &made_app, &tmp_env);
|
||||||
app->idx = app_num;
|
|
||||||
app_num++;
|
|
||||||
if (ORTE_SUCCESS != rc) {
|
if (ORTE_SUCCESS != rc) {
|
||||||
/* Assume that the error message has already been
|
/* Assume that the error message has already been
|
||||||
printed; no need to cleanup -- we can just exit */
|
printed; no need to cleanup -- we can just exit */
|
||||||
@ -1414,6 +1408,8 @@ static int parse_appfile(char *filename, char ***env)
|
|||||||
}
|
}
|
||||||
if (made_app) {
|
if (made_app) {
|
||||||
size_t dummy;
|
size_t dummy;
|
||||||
|
app->idx = app_num;
|
||||||
|
++app_num;
|
||||||
orte_pointer_array_add(&dummy, apps_pa, app);
|
orte_pointer_array_add(&dummy, apps_pa, app);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user