Fix a couple of minor memory leaks
This commit was SVN r14166.
Этот коммит содержится в:
родитель
bc1b046e33
Коммит
ce6b44d476
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
@ -170,11 +170,13 @@ int mca_base_param_recache_files(bool rel_path_search)
|
||||
home = getenv("USERPROFILE");
|
||||
#endif /* !defined(__WINDOWS__) */
|
||||
|
||||
if(NULL == cwd) {
|
||||
cwd = (char *) malloc(sizeof(char) * MAXPATHLEN);
|
||||
if( NULL == (cwd = getcwd(cwd, MAXPATHLEN) )) {
|
||||
opal_output(0, "Error: Unable to get the current working directory\n");
|
||||
cwd = strdup(".");
|
||||
}
|
||||
}
|
||||
|
||||
asprintf(&files,
|
||||
"%s"OPAL_PATH_SEP".openmpi"OPAL_PATH_SEP"mca-params.conf%c%s"OPAL_PATH_SEP"openmpi-mca-params.conf",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
@ -115,6 +115,7 @@ int opal_setenv(const char *name, const char *value, bool overwrite,
|
||||
} else if (NULL == *env) {
|
||||
i = 0;
|
||||
opal_argv_append(&i, env, newvalue);
|
||||
free(newvalue);
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user