mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
Remove a pointless level of indirection
This commit is contained in:
parent
96a5d169dd
commit
1d83fbffae
@ -9558,7 +9558,6 @@ NTSTATUS open_fake_file(connection_struct *conn,
|
||||
const char *fname,
|
||||
uint32 access_mask,
|
||||
files_struct **result);
|
||||
void destroy_fake_file_handle(struct fake_file_handle **fh);
|
||||
NTSTATUS close_fake_file(files_struct *fsp);
|
||||
|
||||
/* The following definitions come from smbd/file_access.c */
|
||||
|
@ -146,14 +146,6 @@ NTSTATUS open_fake_file(connection_struct *conn,
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
void destroy_fake_file_handle(struct fake_file_handle **fh)
|
||||
{
|
||||
if (!fh) {
|
||||
return;
|
||||
}
|
||||
TALLOC_FREE(*fh);
|
||||
}
|
||||
|
||||
NTSTATUS close_fake_file(files_struct *fsp)
|
||||
{
|
||||
file_free(fsp);
|
||||
|
@ -400,9 +400,7 @@ void file_free(files_struct *fsp)
|
||||
|
||||
string_free(&fsp->fsp_name);
|
||||
|
||||
if (fsp->fake_file_handle) {
|
||||
destroy_fake_file_handle(&fsp->fake_file_handle);
|
||||
}
|
||||
TALLOC_FREE(fsp->fake_file_handle);
|
||||
|
||||
if (fsp->fh->ref_count == 1) {
|
||||
SAFE_FREE(fsp->fh);
|
||||
|
Loading…
Reference in New Issue
Block a user