From c40b9975d0bb3fdffdab281ad4f5e222d63d8674 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Wed, 21 Mar 2012 10:58:03 +0530 Subject: protocol/client: memory leak fixes. Signed-off-by: Raghavendra G Change-Id: I804c934d79ed13ded9d1b741cef6597bc238e476 BUG: 803675 Reviewed-on: http://review.gluster.com/2987 Reviewed-by: Amar Tumballi Tested-by: Gluster Build System --- xlators/protocol/client/src/client.c | 14 ++------------ xlators/protocol/client/src/client3_1-fops.c | 4 ++-- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index 93394ebfbfb..82d90d25779 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -292,7 +292,6 @@ client_releasedir (xlator_t *this, fd_t *fd) clnt_conf_t *conf = NULL; rpc_clnt_procedure_t *proc = NULL; clnt_args_t args = {0,}; - call_frame_t *frame = NULL; conf = this->private; if (!conf || !conf->fops) @@ -308,11 +307,7 @@ client_releasedir (xlator_t *this, fd_t *fd) goto out; } if (proc->fn) { - frame = create_frame (this, this->ctx->pool); - if (!frame) { - goto out; - } - ret = proc->fn (frame, this, &args); + ret = proc->fn (NULL, this, &args); } out: if (ret) @@ -328,7 +323,6 @@ client_release (xlator_t *this, fd_t *fd) clnt_conf_t *conf = NULL; rpc_clnt_procedure_t *proc = NULL; clnt_args_t args = {0,}; - call_frame_t *frame = NULL; conf = this->private; if (!conf || !conf->fops) @@ -343,11 +337,7 @@ client_release (xlator_t *this, fd_t *fd) goto out; } if (proc->fn) { - frame = create_frame (this, this->ctx->pool); - if (!frame) { - goto out; - } - ret = proc->fn (frame, this, &args); + ret = proc->fn (NULL, this, &args); } out: if (ret) diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c index 8558d683782..fa9b930396a 100644 --- a/xlators/protocol/client/src/client3_1-fops.c +++ b/xlators/protocol/client/src/client3_1-fops.c @@ -2337,7 +2337,7 @@ client3_1_releasedir (call_frame_t *frame, xlator_t *this, clnt_args_t *args = NULL; int64_t remote_fd = -1; - if (!frame || !this || !data) + if (!this || !data) goto out; args = data; @@ -2379,7 +2379,7 @@ client3_1_release (call_frame_t *frame, xlator_t *this, clnt_args_t *args = NULL; lk_heal_state_t lk_heal_state = GF_LK_HEAL_DONE; - if (!frame || !this || !data) + if (!this || !data) goto out; args = data; -- cgit