summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-transport/rdma/src/rdma.c
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/rpc-transport/rdma/src/rdma.c')
-rw-r--r--rpc/rpc-transport/rdma/src/rdma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c
index d2f04bd6d0c..8da8e3b01b3 100644
--- a/rpc/rpc-transport/rdma/src/rdma.c
+++ b/rpc/rpc-transport/rdma/src/rdma.c
@@ -3252,7 +3252,7 @@ __gf_rdma_teardown (rpc_transport_t *this)
priv = this->private;
peer = &priv->peer;
- if (peer->cm_id->qp != NULL) {
+ if (peer->cm_id && peer->cm_id->qp != NULL) {
__gf_rdma_destroy_qp (this);
}