summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorKinglong Mee <kinglongmee@gmail.com>2015-07-13 17:30:51 +0800
committerJ. Bruce Fields <bfields@redhat.com>2015-08-10 16:05:45 -0400
commitaf9dbaf48d00a34c2933ed0c0e9c82b37eb16356 (patch)
treeba9d57adbde48551873a5bca0d86ef4ec17c33d3 /fs/nfsd/nfs4state.c
parent1b6dc1dffbb142de60eb65f6155276ac31ff5474 (diff)
downloadop-kernel-dev-af9dbaf48d00a34c2933ed0c0e9c82b37eb16356.zip
op-kernel-dev-af9dbaf48d00a34c2933ed0c0e9c82b37eb16356.tar.gz
nfsd: Fix a memory leak of struct file_lock
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 61dfb33..84fb6eb 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -3934,6 +3934,7 @@ static int nfs4_setlease(struct nfs4_delegation *dp)
if (!filp) {
/* We should always have a readable file here */
WARN_ON_ONCE(1);
+ locks_free_lock(fl);
return -EBADF;
}
fl->fl_file = filp;
OpenPOWER on IntegriCloud