Skip to content

Commit

Permalink
cifs: Fix missed free operations
Browse files Browse the repository at this point in the history
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: aa08185 ("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>
  • Loading branch information
WillLester authored and Steve French committed Oct 21, 2019
1 parent 03d9a9f commit 783bf7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/cifs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2475,9 +2475,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;
}
Expand Down

0 comments on commit 783bf7b

Please sign in to comment.