From 82e0fb290db880323613a3791acd33f96d421363 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Sat, 5 Jul 2014 12:19:28 +0530 Subject: client_t: Fix memory leaks - Assign frame->root->client so that gf_client_unref happens in server_connection_cleanup_flush_cbk - Avoid taking extra ref in gf_client_get TODO: The whole reason why there are two types of refs bind, ref-count is to avoid lock inside lock which is not the case now. I will be sending one more patch which will accomplish that as well as changing the tablearray to list Change-Id: Ic9971cf248c5ee2cdbfdef8e9ff6d54e3ec60ced BUG: 1116672 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/8247 Tested-by: Gluster Build System Reviewed-by: Kaleb KEITHLEY Reviewed-by: Vijay Bellur --- xlators/protocol/server/src/server-handshake.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xlators/protocol/server/src/server-handshake.c') diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c index 98418e77893..9396499cc3d 100644 --- a/xlators/protocol/server/src/server-handshake.c +++ b/xlators/protocol/server/src/server-handshake.c @@ -757,12 +757,13 @@ server_set_lk_version (rpcsvc_request_t *req) } serv_ctx->lk_version = args.lk_ver; - gf_client_put (client, NULL); - rsp.lk_ver = args.lk_ver; op_ret = 0; fail: + if (client) + gf_client_put (client, NULL); + rsp.op_ret = op_ret; rsp.op_errno = op_errno; server_submit_reply (NULL, req, &rsp, NULL, 0, NULL, -- cgit