Skip to content

Commit 2432daf

Browse files
author
Ralph Castain
committed
Some minor cleanups of a memory leak and error output
1 parent 5b8a40a commit 2432daf

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

opal/mca/pmix/pmix120/pmix/src/server/pmix_server.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,11 @@ static pmix_status_t initialize_server_base(pmix_server_module_t *module)
225225
// plus the '/' separator are too long, just fail, so the caller
226226
// may provide the user with a proper help... *Cough*, *Cough* OSX...
227227
if ((strlen(tdir) + strlen(pmix_pid) + 1) > sizeof(myaddress.sun_path)-1) {
228+
free(pmix_pid);
228229
return PMIX_ERR_INVALID_LENGTH;
229230
}
230231
snprintf(myaddress.sun_path, sizeof(myaddress.sun_path)-1, "%s/%s", tdir, pmix_pid);
232+
free(pmix_pid);
231233
asprintf(&myuri, "%s:%lu:%s", pmix_globals.myid.nspace, (unsigned long)pmix_globals.myid.rank, myaddress.sun_path);
232234

233235

orte/mca/ess/base/ess_base_std_orted.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,9 @@ int orte_ess_base_orted_setup(char **hosts)
514514
opal_pmix_base_set_evbase(orte_event_base);
515515
/* setup the PMIx server */
516516
if (ORTE_SUCCESS != (ret = pmix_server_init())) {
517-
ORTE_ERROR_LOG(ret);
518-
error = "Try a shorter TMPDIR var. or change your computer's name (see uname -n), since pmix_server_init";
517+
/* the server code already barked, so let's be quiet */
518+
ret = ORTE_ERR_SILENT;
519+
error = "pmix_server_init";
519520
goto error;
520521
}
521522

orte/mca/ess/hnp/ess_hnp_module.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -633,8 +633,9 @@ static int rte_init(void)
633633

634634
/* setup the PMIx server */
635635
if (ORTE_SUCCESS != (ret = pmix_server_init())) {
636-
ORTE_ERROR_LOG(ret);
637-
error = "Try a shorter TMPDIR var. or change your computer's name (see uname -n), since pmix_server_init";
636+
/* the server code already barked, so let's be quiet */
637+
ret = ORTE_ERR_SILENT;
638+
error = "pmix_server_init";
638639
goto error;
639640
}
640641

0 commit comments

Comments
 (0)