diff options
author | Vijay Bellur <vijay@gluster.com> | 2012-03-02 00:54:12 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-03-01 11:42:56 -0800 |
commit | 71cffc0b66b849306778515d385083b9f78857f5 (patch) | |
tree | 819cd87a7e28a4923fda8ca7cc6e0c4d087413ab /xlators/protocol/client | |
parent | 0d62b3e4cd9de73b0cb7e54f904eefe27581cf4d (diff) |
Fix memory leaks found in readdir
Change-Id: I0e221e4de9ee12586b09cd8bf7f394e9d4b88a11
BUG: 765785
Reviewed-on: http://review.gluster.com/2853
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/protocol/client')
-rw-r--r-- | xlators/protocol/client/src/client3_1-fops.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c index 89c6e287cb4..b460b167b2e 100644 --- a/xlators/protocol/client/src/client3_1-fops.c +++ b/xlators/protocol/client/src/client3_1-fops.c @@ -5076,6 +5076,9 @@ client3_1_readdirp (call_frame_t *frame, xlator_t *this, goto unwind; } + if (req.dict.dict_val) + GF_FREE (req.dict.dict_val); + return 0; unwind: gf_log (this->name, GF_LOG_WARNING, "failed to send the fop: %s", strerror (op_errno)); @@ -5091,6 +5094,9 @@ unwind: iobuf_unref (rsp_iobuf); } + if (req.dict.dict_val) + GF_FREE (req.dict.dict_val); + STACK_UNWIND_STRICT (readdirp, frame, -1, op_errno, NULL); return 0; } |