浏览代码

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>
Kinglong Mee 10 年之前
父节点
当前提交
af9dbaf48d
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      fs/nfsd/nfs4state.c

+ 1 - 0
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;