From dfb1d61b0e9f9e2c542e9adc8d970689f4114ff6 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Mon, 16 Sep 2013 14:51:59 +0200 Subject: 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: Miklos Szeredi Cc: Steve French Cc: stable@vger.kernel.org Signed-off-by: Al Viro --- fs/cifs/dir.c | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/cifs/dir.c') diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index d3e2eaa503a..5384c2a640c 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c @@ -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; } -- cgit v1.2.3-18-g5258