mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
smbd: Move the call to file_free() out of close_fake_file()
Centralize calling file_free(), but leave close_fake_file() in for API symmetry reasons. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
2293ca5b57
commit
244c5a7d31
@ -1532,6 +1532,7 @@ NTSTATUS close_file(struct smb_request *req, files_struct *fsp,
|
||||
|
||||
if (fsp->fake_file_handle != NULL) {
|
||||
status = close_fake_file(req, fsp);
|
||||
file_free(req, fsp);
|
||||
} else if (fsp->print_file != NULL) {
|
||||
/* FIXME: return spool errors */
|
||||
print_spool_end(fsp, close_type);
|
||||
|
@ -206,6 +206,8 @@ NTSTATUS open_fake_file(struct smb_request *req, connection_struct *conn,
|
||||
|
||||
NTSTATUS close_fake_file(struct smb_request *req, files_struct *fsp)
|
||||
{
|
||||
file_free(req, fsp);
|
||||
/*
|
||||
* Nothing to do, fake files don't hold any resources
|
||||
*/
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user