From: Kinglong Mee Date: Mon, 13 Jul 2015 09:30:51 +0000 (+0800) Subject: nfsd: Fix a memory leak of struct file_lock X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=af9dbaf48d00a34c2933ed0c0e9c82b37eb16356;p=linux-beck.git nfsd: Fix a memory leak of struct file_lock Signed-off-by: Kinglong Mee Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 61dfb33f0559..84fb6eb5ff2f 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;