Skip to content

Commit 783bf7b

Browse files
WillLestersmfrench
authored andcommitted
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 <[email protected]> Fixes: aa08185 ("cifs: flush before set-info if we have writeable handles") Signed-off-by: Chuhong Yuan <[email protected]> Signed-off-by: Steve French <[email protected]> Reviewed-by: Pavel Shilovsky <[email protected]>
1 parent 03d9a9f commit 783bf7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/cifs/inode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2475,9 +2475,9 @@ cifs_setattr_nounix(struct dentry *direntry, struct iattr *attrs)
24752475
rc = tcon->ses->server->ops->flush(xid, tcon, &wfile->fid);
24762476
cifsFileInfo_put(wfile);
24772477
if (rc)
2478-
return rc;
2478+
goto cifs_setattr_exit;
24792479
} else if (rc != -EBADF)
2480-
return rc;
2480+
goto cifs_setattr_exit;
24812481
else
24822482
rc = 0;
24832483
}

0 commit comments

Comments
 (0)