diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/psensor/file/psensor_file.c b/opal/mca/pmix/pmix2x/pmix/src/mca/psensor/file/psensor_file.c index 4daeac29b1..09cc3e7062 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/mca/psensor/file/psensor_file.c +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/psensor/file/psensor_file.c @@ -113,7 +113,7 @@ static void ft_destructor(file_tracker_t *ft) if (NULL != ft->id) { free(ft->id); } - if (event_active) { + if (ft->event_active) { pmix_event_del(&ft->ev); } if (NULL != ft->file) { diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/psensor/heartbeat/psensor_heartbeat.c b/opal/mca/pmix/pmix2x/pmix/src/mca/psensor/heartbeat/psensor_heartbeat.c index 0c07084279..b7be014923 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/mca/psensor/heartbeat/psensor_heartbeat.c +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/psensor/heartbeat/psensor_heartbeat.c @@ -88,7 +88,7 @@ static void ft_destructor(pmix_heartbeat_trkr_t *ft) if (NULL != ft->id) { free(ft->id); } - if (event_active) { + if (ft->event_active) { pmix_event_del(&ft->ev); } if (NULL != ft->info) { diff --git a/orte/mca/odls/base/odls_base_default_fns.c b/orte/mca/odls/base/odls_base_default_fns.c index ff0f6d20ec..bfb7bfb5a1 100644 --- a/orte/mca/odls/base/odls_base_default_fns.c +++ b/orte/mca/odls/base/odls_base_default_fns.c @@ -1113,10 +1113,15 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata) } if (NULL != effective_dir) { free(effective_dir); + effective_dir = NULL; } } GETOUT: + if (NULL != effective_dir) { + free(effective_dir); + effective_dir = NULL; + } /* tell the state machine that all local procs for this job * were launched so that it can do whatever it needs to do, * like send a state update message for all procs to the HNP @@ -1124,6 +1129,10 @@ void orte_odls_base_default_launch_local(int fd, short sd, void *cbdata) ORTE_ACTIVATE_JOB_STATE(jobdat, ORTE_JOB_STATE_LOCAL_LAUNCH_COMPLETE); ERROR_OUT: + if (NULL != effective_dir) { + free(effective_dir); + effective_dir = NULL; + } /* ensure we reset our working directory back to our default location */ chdir(basedir); /* release the event */ @@ -1716,6 +1725,9 @@ int orte_odls_base_default_restart_proc(orte_proc_t *child, /* setup the path */ if (ORTE_SUCCESS != (rc = setup_path(app, &wdir))) { ORTE_ERROR_LOG(rc); + if (NULL != wdir) { + free(wdir); + } goto CLEANUP; } diff --git a/orte/mca/schizo/slurm/schizo_slurm.c b/orte/mca/schizo/slurm/schizo_slurm.c index e88a8d9970..3f5bebe6ce 100644 --- a/orte/mca/schizo/slurm/schizo_slurm.c +++ b/orte/mca/schizo/slurm/schizo_slurm.c @@ -148,9 +148,11 @@ static int get_remaining_time(uint32_t *timeleft) } if (NULL == fgets(output, 256, fp)) { free(cmd); + pclose(fp); return ORTE_ERR_FILE_READ_FAILURE; } free(cmd); + pclose(fp); /* the output is returned in a colon-delimited set of fields */ res = opal_argv_split(output, ':'); cnt = opal_argv_count(res);