summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorChuhong Yuan <hslester96@gmail.com>2019-10-14 15:15:31 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-29 09:22:38 +0100
commit0715022a4f6dbd7c7b830007b2a00d5a9f06d66c (patch)
tree977e5e5ec6cdd3e4ea4643a4d563baf9ea80318e /fs
parentdfebd925c3fccc95aacb9e108455701e7c187de8 (diff)
cifs: Fix missed free operations
commit 783bf7b8b641167fb6f3f4f787f60ae62bad41b3 upstream. cifs_setattr_nounix has two paths which miss free operations for xid and fullpath. Use goto cifs_setattr_exit like other paths to fix them. CC: Stable <stable@vger.kernel.org> Fixes: aa081859b10c ("cifs: flush before set-info if we have writeable handles") Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 79d9a60f21ba..3c952024e10f 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -2465,9 +2465,9 @@ cifs_setattr_nounix(struct dentry *direntry, struct iattr *attrs)
rc = tcon->ses->server->ops->flush(xid, tcon, &wfile->fid);
cifsFileInfo_put(wfile);
if (rc)
- return rc;
+ goto cifs_setattr_exit;
} else if (rc != -EBADF)
- return rc;
+ goto cifs_setattr_exit;
else
rc = 0;
}