提交 dfb1d61b 编写于 作者: M Miklos Szeredi 提交者: Al Viro

cifs: fix filp leak in cifs_atomic_open()

If an error occurs after having called finish_open() then fput() needs to
be called on the already opened file.
Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
Cc: Steve French <sfrench@samba.org>
Cc: stable@vger.kernel.org
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 0854d450
......@@ -500,6 +500,7 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
if (server->ops->close)
server->ops->close(xid, tcon, &fid);
cifs_del_pending_open(&open);
fput(file);
rc = -ENOMEM;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册