From 9babd965ba885ca8bea4c58e708a3b9f0d6f076c Mon Sep 17 00:00:00 2001 From: Nigel Babu Date: Wed, 1 Mar 2017 07:16:19 +0530 Subject: 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: https://review.gluster.org/16790 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Jeff Darcy --- rpc/rpc-transport/rdma/src/rdma.c | 1 + 1 file changed, 1 insertion(+) (limited to 'rpc') 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)", -- cgit