From bdb5ca2339edc76b81d1ff996d695eecd849760f Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Wed, 18 Feb 2015 22:50:34 +0530 Subject: rdma: free rdma priv data if init fails Change-Id: I57b38c8783666e806836dacf3f74cf9f6876070a BUG: 1164079 Signed-off-by: Atin Mukherjee Reviewed-on: http://review.gluster.org/9687 Reviewed-by: mohammed rafi kc Tested-by: Gluster Build System Reviewed-by: Raghavendra G Tested-by: Raghavendra G --- rpc/rpc-transport/rdma/src/rdma.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'rpc') diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c index e6ed91e05c7..89a00b736fd 100644 --- a/rpc/rpc-transport/rdma/src/rdma.c +++ b/rpc/rpc-transport/rdma/src/rdma.c @@ -4732,6 +4732,8 @@ init (rpc_transport_t *this) if (gf_rdma_init (this)) { gf_log (this->name, GF_LOG_WARNING, "Failed to initialize IB Device"); + this->private = NULL; + GF_FREE (priv); return -1; } iobuf_pool = this->ctx->iobuf_pool; -- cgit