path: root/rpc/rpc-transport/rdma/src/rdma.c
diff options
authorNigel Babu <>2017-03-01 07:16:19 +0530
committerJeff Darcy <>2017-03-01 12:30:17 -0500
commit9babd965ba885ca8bea4c58e708a3b9f0d6f076c (patch)
tree7bd528bf1637947c9f32986759b8612fc0b38183 /rpc/rpc-transport/rdma/src/rdma.c
parentc78d07fb8efdd5f63284332473852619d5da4244 (diff)
Return ret as soon as `this` is freed
Omitting this return causes a confusing error message in the next block, which is also a case of use after free. This bug was found by Coverity scan. BUG: 789278 Change-Id: Ifd4932de437e8ae875ff191033ea43cff81b701d Signed-off-by: Nigel Babu <> Reviewed-on: Smoke: Gluster Build System <> NetBSD-regression: NetBSD Build System <> CentOS-regression: Gluster Build System <> Reviewed-by: Jeff Darcy <>
Diffstat (limited to 'rpc/rpc-transport/rdma/src/rdma.c')
1 files changed, 1 insertions, 0 deletions
diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c
index d2f04bd..14b068c 100644
--- a/rpc/rpc-transport/rdma/src/rdma.c
+++ b/rpc/rpc-transport/rdma/src/rdma.c
@@ -1130,6 +1130,7 @@ gf_rdma_cm_handle_addr_resolved (struct rdma_cm_event *event)
"failed (me:%s peer:%s)",
this->myinfo.identifier, this->peerinfo.identifier);
gf_rdma_cm_handle_disconnect (this);
+ return ret;
gf_msg_trace (this->name, 0, "Address resolved (me:%s peer:%s)",