From 088b6cdeeeffe741a856e73788ed36347d0262b6 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Thu, 17 Aug 2017 09:49:35 -0700 Subject: [PATCH] Silence coverity warnings Signed-off-by: Ralph Castain --- .../pmix2x/pmix/src/mca/ptl/tcp/ptl_tcp.c | 3 +++ orte/mca/ess/base/ess_base_std_tool.c | 27 +------------------ 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/opal/mca/pmix/pmix2x/pmix/src/mca/ptl/tcp/ptl_tcp.c b/opal/mca/pmix/pmix2x/pmix/src/mca/ptl/tcp/ptl_tcp.c index 0640afccb9..12087e7e23 100644 --- a/opal/mca/pmix/pmix2x/pmix/src/mca/ptl/tcp/ptl_tcp.c +++ b/opal/mca/pmix/pmix2x/pmix/src/mca/ptl/tcp/ptl_tcp.c @@ -319,6 +319,9 @@ static pmix_status_t connect_to_peer(struct pmix_peer_t *peer, /* do a final bozo check */ if (NULL == nspace || PMIX_RANK_WILDCARD == rank) { + if (NULL != nspace) { + free(nspace); + } CLOSE_THE_SOCKET(sd); return PMIX_ERR_UNREACH; } diff --git a/orte/mca/ess/base/ess_base_std_tool.c b/orte/mca/ess/base/ess_base_std_tool.c index 8ca613a5b6..05152b0b5c 100644 --- a/orte/mca/ess/base/ess_base_std_tool.c +++ b/orte/mca/ess/base/ess_base_std_tool.c @@ -98,9 +98,7 @@ int orte_ess_base_tool_setup(void) ORTE_PROC_MY_NAME->jobid = OPAL_PROC_MY_NAME.jobid; ORTE_PROC_MY_NAME->vpid = OPAL_PROC_MY_NAME.vpid; } else { - /* if we connected to a PMIx server, then we were assigned - * a name that we should use. Otherwise, we have to define - * one here */ + /* we have to define our name here */ if (NULL != orte_ess_base_jobid && NULL != orte_ess_base_vpid) { opal_output_verbose(2, orte_ess_base_framework.framework_output, @@ -142,29 +140,6 @@ int orte_ess_base_tool_setup(void) orte_process_info.super.proc_arch = opal_local_arch; opal_proc_local_set(&orte_process_info.super); - /* setup the PMIx framework - ensure it skips all non-PMIx components, - * but do not override anything we were given */ - opal_setenv("OMPI_MCA_pmix", "^s1,s2,cray,isolated", false, &environ); - if (OPAL_SUCCESS != (ret = mca_base_framework_open(&opal_pmix_base_framework, 0))) { - ORTE_ERROR_LOG(ret); - error = "orte_pmix_base_open"; - goto error; - } - if (ORTE_SUCCESS != (ret = opal_pmix_base_select())) { - ORTE_ERROR_LOG(ret); - error = "opal_pmix_base_select"; - goto error; - } - /* initialize - the layer below has our name in opal_process_name_t - * and will pass it to PMIx to sync */ - if (OPAL_SUCCESS != (ret = opal_pmix.tool_init(NULL))) { - ORTE_ERROR_LOG(ret); - error = "opal_pmix.init"; - goto error; - } - /* set the event base */ - opal_pmix_base_set_evbase(orte_event_base); - /* open and setup the state machine */ if (ORTE_SUCCESS != (ret = mca_base_framework_open(&orte_state_base_framework, 0))) { ORTE_ERROR_LOG(ret);