diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2014-07-05 12:19:28 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-07-09 05:09:26 -0700 |
commit | 82e0fb290db880323613a3791acd33f96d421363 (patch) | |
tree | b011dad9477373295a181d659fa20fef6abbbca0 /xlators/protocol/server/src/server.c | |
parent | 56c7b07c746ba7ae86117f19bbf304e1150184fb (diff) |
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 <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8247
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/protocol/server/src/server.c')
-rw-r--r-- | xlators/protocol/server/src/server.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index 60092a557de..3de856e8e09 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -201,18 +201,18 @@ server_submit_reply (call_frame_t *frame, rpcsvc_request_t *req, void *arg, ret = 0; ret: - if (state) { + if (state) free_state (state); - } - if (frame) { + if (client) gf_client_unref (client); + + if (frame) STACK_DESTROY (frame->root); - } - if (new_iobref) { + if (new_iobref) iobref_unref (iobref); - } + return ret; } |