diff options
author | Volker Lendecke <vl@samba.org> | 2008-10-08 17:42:22 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2008-10-15 18:06:18 +0200 |
commit | 3fbab3358811648ae08f7a5eb86ca56f6b90551f (patch) | |
tree | 18b55b47970ca54c455b7870d67acfddc411a7ec | |
parent | 76d41cf383b097f5f61879ea1fed7291f98bbe14 (diff) | |
download | samba-3fbab3358811648ae08f7a5eb86ca56f6b90551f.tar.gz samba-3fbab3358811648ae08f7a5eb86ca56f6b90551f.tar.xz samba-3fbab3358811648ae08f7a5eb86ca56f6b90551f.zip |
Remove a pointless level of indirection
(cherry picked from commit f953fd62f7e4d4d18eb4d713989eacce630c4949)
-rw-r--r-- | source/include/proto.h | 1 | ||||
-rw-r--r-- | source/smbd/fake_file.c | 8 | ||||
-rw-r--r-- | source/smbd/files.c | 4 |
3 files changed, 1 insertions, 12 deletions
diff --git a/source/include/proto.h b/source/include/proto.h index d990b471d92..cd24bf83fd3 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -9652,7 +9652,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 */ diff --git a/source/smbd/fake_file.c b/source/smbd/fake_file.c index 8dd9abee1ad..1761cb66a85 100644 --- a/source/smbd/fake_file.c +++ b/source/smbd/fake_file.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); diff --git a/source/smbd/files.c b/source/smbd/files.c index 8d06e20f810..519f4945f22 100644 --- a/source/smbd/files.c +++ b/source/smbd/files.c @@ -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); |