From b3c6ee00f9fdc80330979e62fbd7f9bec9440b35 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 12 Sep 2012 14:06:53 +0530 Subject: features/quota: Avoid mem_put on null local Problem: QUOTA_STACK_UNWIND does not check if local is NULL before mem_put. This leads to a callingfn log for every setxattr in quota. Fix: Made sure the mem_put happens only on non-null local in quota. Additional changes: Removed unused QUOTA_STACK_DESTROY macro. Tests: Peformed setfattr on the mount point and the Invalid argument logs don't come anymore. Checked that the change does not introduce any memory leak in quota. Change-Id: Ie4534c7af0fff80e35d8510311055f930262594f BUG: 856541 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/3936 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Anand Avati --- xlators/features/quota/src/quota.c | 1 + 1 file changed, 1 insertion(+) (limited to 'xlators/features/quota/src/quota.c') diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index cea9a9a0e2b..b60e37d9c80 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -126,6 +126,7 @@ quota_local_cleanup (xlator_t *this, quota_local_t *local) inode_unref (local->inode); LOCK_DESTROY (&local->lock); + mem_put (local); out: return 0; } -- cgit