diff --git a/opal/mca/btl/openib/btl_openib_endpoint.c b/opal/mca/btl/openib/btl_openib_endpoint.c index 540c3902c06..a4f84e08927 100644 --- a/opal/mca/btl/openib/btl_openib_endpoint.c +++ b/opal/mca/btl/openib/btl_openib_endpoint.c @@ -613,13 +613,13 @@ void mca_btl_openib_endpoint_connected(mca_btl_openib_endpoint_t *endpoint) opal_progress_event_users_decrement(); if(MCA_BTL_XRC_ENABLED) { - while(master && !opal_list_is_empty(&endpoint->ib_addr->pending_ep)) { - ep_item = opal_list_remove_first(&endpoint->ib_addr->pending_ep); - ep = (mca_btl_openib_endpoint_t *)ep_item; - if (OPAL_SUCCESS != - opal_btl_openib_connect_base_start(endpoint->endpoint_local_cpc, - ep)) { - BTL_ERROR(("Failed to connect pending endpoint\n")); + if (master) { + while (NULL != (ep_item = opal_list_remove_first(&endpoint->ib_addr->pending_ep))) { + ep = (mca_btl_openib_endpoint_t *)ep_item; + if (OPAL_SUCCESS != + opal_btl_openib_connect_base_start(endpoint->endpoint_local_cpc, ep)) { + BTL_ERROR(("Failed to connect pending endpoint\n")); + } } } OPAL_THREAD_UNLOCK(&endpoint->ib_addr->addr_lock); diff --git a/opal/mca/pmix/base/pmix_base_fns.c b/opal/mca/pmix/base/pmix_base_fns.c index 0cd99b402ca..30d091d181a 100644 --- a/opal/mca/pmix/base/pmix_base_fns.c +++ b/opal/mca/pmix/base/pmix_base_fns.c @@ -1,6 +1,6 @@ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* - * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights + * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014 Intel, Inc. All rights reserved. * Copyright (c) 2014-2015 Research Organization for Information Science @@ -424,11 +424,7 @@ int opal_pmix_base_cache_keys_locally(const opal_process_name_t* id, const char* kv->data.byte = *tmp3; break; case OPAL_STRING: - if (NULL != tmp3) { - kv->data.string = strdup(tmp3); - } else { - kv->data.string = NULL; - } + kv->data.string = strdup(tmp3); break; case OPAL_PID: kv->data.pid = strtoul(tmp3, NULL, 10); diff --git a/opal/mca/pmix/native/pmix_native.c b/opal/mca/pmix/native/pmix_native.c index 781321235a4..7f98c911257 100644 --- a/opal/mca/pmix/native/pmix_native.c +++ b/opal/mca/pmix/native/pmix_native.c @@ -5,6 +5,8 @@ * and Technology (RIST). All rights reserved. * Copyright (c) 2014 Mellanox Technologies, Inc. * All rights reserved. + * Copyright (c) 2015 Los Alamos National Security, LLC. All rights + * reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -699,10 +701,12 @@ static void fencenb_cbfunc(opal_buffer_t *buf, void *cbdata) } /* if a callback was provided, execute it */ - if (NULL != cb && NULL != cb->cbfunc) { - cb->cbfunc(rc, NULL, cb->cbdata); + if (NULL != cb) { + if (NULL != cb->cbfunc) { + cb->cbfunc(rc, NULL, cb->cbdata); + } + OBJ_RELEASE(cb); } - OBJ_RELEASE(cb); } static int native_fence_nb(opal_process_name_t *procs, size_t nprocs,