summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-03-06 19:31:38 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2015-03-06 19:31:38 +0100
commit7c5bde7adeba317d266b09db8ea9c3857eda86f5 (patch)
tree0ad81b6e3ffe0725123da420e0ebfd16f602e053 /fs
parentMerge tag 'nfs-for-4.0-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs (diff)
parentlocks: fix fasync_struct memory leak in lease upgrade/downgrade handling (diff)
downloadlinux-7c5bde7adeba317d266b09db8ea9c3857eda86f5.tar.xz
linux-7c5bde7adeba317d266b09db8ea9c3857eda86f5.zip
Merge tag 'locks-v4.0-3' of git://git.samba.org/jlayton/linux
Pull file locking fix from Jeff Layton: "Just a single patch to fix a memory leak that Daniel Wagner discovered while doing some testing with leases" * tag 'locks-v4.0-3' of git://git.samba.org/jlayton/linux: locks: fix fasync_struct memory leak in lease upgrade/downgrade handling
Diffstat (limited to 'fs')
-rw-r--r--fs/locks.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/locks.c b/fs/locks.c
index 365c82e1b3a9..f1bad681fc1c 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1665,7 +1665,8 @@ generic_add_lease(struct file *filp, long arg, struct file_lock **flp, void **pr
}
if (my_fl != NULL) {
- error = lease->fl_lmops->lm_change(my_fl, arg, &dispose);
+ lease = my_fl;
+ error = lease->fl_lmops->lm_change(lease, arg, &dispose);
if (error)
goto out;
goto out_setup;