From 9d73eb4c8a9bf1e802985abee83ad36439ab681a Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Sun, 18 Oct 2009 11:42:30 +0000 Subject: locks: fix leak in inodelk unlock was resulting in leak of lock structure if it was unlocking the last existing lock Signed-off-by: Anand V. Avati BUG: 306 (Enhance locks to aid debugging) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=306 --- xlators/features/locks/src/inodelk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/features') diff --git a/xlators/features/locks/src/inodelk.c b/xlators/features/locks/src/inodelk.c index dd6c54bddfc..1ec5b00417f 100644 --- a/xlators/features/locks/src/inodelk.c +++ b/xlators/features/locks/src/inodelk.c @@ -281,11 +281,12 @@ grant_blocked_inode_locks (xlator_t *this, pl_inode_t *pl_inode, pl_inode_lock_t { if (list_empty (&dom->blocked_inodelks)) { - return; + goto out; } __grant_blocked_inode_locks (this, pl_inode, dom); +out: __destroy_inode_lock (lock); } -- cgit