summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-transport/rdma/src
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/rpc-transport/rdma/src')
-rw-r--r--rpc/rpc-transport/rdma/src/rdma.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c
index 89a00b736fd..b324fd266db 100644
--- a/rpc/rpc-transport/rdma/src/rdma.c
+++ b/rpc/rpc-transport/rdma/src/rdma.c
@@ -802,7 +802,9 @@ out:
mem_pool_destroy (trav->ioq_pool);
mem_pool_destroy (trav->request_ctx_pool);
mem_pool_destroy (trav->reply_info_pool);
- ibv_dealloc_pd (trav->pd);
+ if (trav->pd != NULL) {
+ ibv_dealloc_pd (trav->pd);
+ }
gf_rdma_destroy_cq (this);
ibv_destroy_comp_channel (trav->recv_chan);
ibv_destroy_comp_channel (trav->send_chan);