Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dfb1d61b authored by Miklos Szeredi's avatar Miklos Szeredi Committed by Al Viro
Browse files

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: default avatarMiklos Szeredi <mszeredi@suse.cz>
Cc: Steve French <sfrench@samba.org>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 0854d450
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}