summaryrefslogtreecommitdiffstats
path: root/xlators/features/locks
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2009-10-18 11:42:30 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-18 10:16:41 -0700
commit9d73eb4c8a9bf1e802985abee83ad36439ab681a (patch)
tree4ab4f6b1ecd9d4b04264677404f699e52f68cd15 /xlators/features/locks
parentaacde00714c60db438c2fdc5ebacbe60a988f60b (diff)
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 <avati@dev.gluster.com> BUG: 306 (Enhance locks to aid debugging) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=306
Diffstat (limited to 'xlators/features/locks')
-rw-r--r--xlators/features/locks/src/inodelk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/features/locks/src/inodelk.c b/xlators/features/locks/src/inodelk.c
index dd6c54bdd..1ec5b0041 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);
}