diff options
author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2011-04-16 05:23:58 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-04-16 04:10:51 -0700 |
commit | d5110f12ac0352991f22cbf4f80d855a8f35ba42 (patch) | |
tree | 6bd7026eabff47e6bcd4a0d65a372cbb2f5d1d7c /xlators | |
parent | a70c0034cc5c7e38390167ebfa9c8706be16fd6d (diff) |
quota: assign local to frame local to prevent memleak
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 2772 ([glusterfs-3.2.0qa12]: excessive quota local NULL errors)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2772
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/features/quota/src/quota.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index 44eca3e89..ebf6a5ec1 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -2182,6 +2182,8 @@ quota_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd) goto unwind; } + frame->local = local; + local->loc.inode = inode_ref (fd->inode); STACK_WIND (frame, quota_fstat_cbk, FIRST_CHILD(this), @@ -2315,6 +2317,8 @@ quota_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, goto unwind; } + frame->local = local; + local->loc.inode = inode_ref (fd->inode); STACK_WIND (frame, quota_readv_cbk, FIRST_CHILD(this), @@ -2516,6 +2520,8 @@ quota_fsetattr (call_frame_t *frame, xlator_t *this, fd_t *fd, goto unwind; } + frame->local = local; + local->loc.inode = inode_ref (fd->inode); STACK_WIND (frame, quota_fsetattr_cbk, FIRST_CHILD (this), |