1
1

Per Sam's eagle-eyed review, free the malloc'd memory if getcwd fails for some strange reason.

This commit was SVN r27150.
Этот коммит содержится в:
Ralph Castain 2012-08-27 19:15:16 +00:00
родитель 9f779f115d
Коммит 6e8c97c77c

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

@ -1040,7 +1040,8 @@ int orte_plm_base_orted_append_basic_args(int *argc, char ***argv,
if( NULL == tmp_force ) {
/* Get the current working directory */
tmp_force = (char *) malloc(sizeof(char) * OPAL_PATH_MAX);
if( NULL == (tmp_force = getcwd(tmp_force, OPAL_PATH_MAX) )) {
if (NULL == getcwd(tmp_force, OPAL_PATH_MAX)) {
free(tmp_force);
tmp_force = strdup("");
}
}