aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorChuhong Yuan <hslester96@gmail.com>2019-10-14 03:15:31 -0400
committerSteve French <stfrench@microsoft.com>2019-10-20 20:19:49 -0400
commit783bf7b8b641167fb6f3f4f787f60ae62bad41b3 (patch)
treede3a1a39e64fad913b677c3b7a7517add2b0639f /fs/cifs
parent03d9a9fe3f3aec508e485dd3dcfa1e99933b4bdb (diff)
cifs: Fix missed free operations
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>
Diffstat (limited to 'fs/cifs')
-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 5dcc95b38310..df9377828e2f 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -2475,9 +2475,9 @@ cifs_setattr_nounix(struct dentry *direntry, struct iattr *attrs)
2475 rc = tcon->ses->server->ops->flush(xid, tcon, &wfile->fid); 2475 rc = tcon->ses->server->ops->flush(xid, tcon, &wfile->fid);
2476 cifsFileInfo_put(wfile); 2476 cifsFileInfo_put(wfile);
2477 if (rc) 2477 if (rc)
2478 return rc; 2478 goto cifs_setattr_exit;
2479 } else if (rc != -EBADF) 2479 } else if (rc != -EBADF)
2480 return rc; 2480 goto cifs_setattr_exit;
2481 else 2481 else
2482 rc = 0; 2482 rc = 0;
2483 } 2483 }