diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2013-09-16 14:51:59 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-01 09:17:45 -0700 |
commit | b1bf3479808bfb56cec46edf5dd9f47364715f46 (patch) | |
tree | df5a3d66f6f9138f21c61d669b2e826b9c83daef /fs/cifs | |
parent | 22df37406d8f90135b77ec6deb9950b68bcf3f4e (diff) |
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>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/dir.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 5699b5036ed..0c2425b2197 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c @@ -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; } |