mirror of
https://github.com/joel16/android_kernel_sony_msm8994_rework.git
synced 2025-02-25 21:22:19 +00:00
cifs: fix filp leak in cifs_atomic_open()
commit dfb1d61b0e9f9e2c542e9adc8d970689f4114ff6 upstream. If an error occurs after having called finish_open() then fput() needs to be called on the already opened file. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Steve French <sfrench@samba.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
22df37406d
commit
b1bf347980
@ -491,6 +491,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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user