From d5110f12ac0352991f22cbf4f80d855a8f35ba42 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Sat, 16 Apr 2011 05:23:58 +0000 Subject: quota: assign local to frame local to prevent memleak Signed-off-by: Raghavendra Bhat Signed-off-by: Anand Avati BUG: 2772 ([glusterfs-3.2.0qa12]: excessive quota local NULL errors) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2772 --- xlators/features/quota/src/quota.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xlators/features/quota/src') 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), -- cgit