File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -403,9 +403,6 @@ int mca_base_var_cache_files(bool rel_path_search)
403
403
char * tmp ;
404
404
int ret ;
405
405
406
- /* We may need this later */
407
- home = (char * )opal_home_directory ();
408
-
409
406
if (NULL == cwd ) {
410
407
cwd = (char * ) malloc (sizeof (char ) * MAXPATHLEN );
411
408
if ( NULL == (cwd = getcwd (cwd , MAXPATHLEN ) )) {
@@ -415,6 +412,13 @@ int mca_base_var_cache_files(bool rel_path_search)
415
412
}
416
413
417
414
#if OPAL_WANT_HOME_CONFIG_FILES
415
+ /* We may need this later */
416
+ home = (char * )opal_home_directory ();
417
+ if (NULL == home ) {
418
+ opal_output (0 , "Error: Unable to get the user home directory\n" );
419
+ return OPAL_ERROR ;
420
+ }
421
+
418
422
opal_asprintf (& mca_base_var_files , "%s" OPAL_PATH_SEP ".openmpi" OPAL_PATH_SEP
419
423
"mca-params.conf%c%s" OPAL_PATH_SEP "openmpi-mca-params.conf" ,
420
424
home , ',' , opal_install_dirs .sysconfdir );
You can’t perform that action at this time.
0 commit comments