summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorNigel Babu <nigelb@redhat.com>2017-03-01 07:16:19 +0530
committerJeff Darcy <jdarcy@redhat.com>2017-03-01 12:30:17 -0500
commit9babd965ba885ca8bea4c58e708a3b9f0d6f076c (patch)
tree7bd528bf1637947c9f32986759b8612fc0b38183 /rpc
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 <nigelb@redhat.com> Reviewed-on: https://review.gluster.org/16790 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-transport/rdma/src/rdma.c1
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 d2f04bd6d0c..14b068c05cb 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)",