summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-10-08 17:42:22 +0200
committerVolker Lendecke <vl@samba.org>2008-10-09 12:06:39 +0200
commit1d83fbffae23325961fd80873c93c06cae5f7a4e (patch)
tree52fedbdd7238c0e6eb4535c49296713b377ff059
parent96a5d169dd3a8746270a9e086717ab6206ab02c6 (diff)
downloadsamba-1d83fbffae23325961fd80873c93c06cae5f7a4e.tar.gz
samba-1d83fbffae23325961fd80873c93c06cae5f7a4e.tar.bz2
samba-1d83fbffae23325961fd80873c93c06cae5f7a4e.zip
Remove a pointless level of indirection
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/smbd/fake_file.c8
-rw-r--r--source3/smbd/files.c4
3 files changed, 1 insertions, 12 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index b7e363253f..99557a25a1 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -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 */
diff --git a/source3/smbd/fake_file.c b/source3/smbd/fake_file.c
index 8dd9abee1a..1761cb66a8 100644
--- a/source3/smbd/fake_file.c
+++ b/source3/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/source3/smbd/files.c b/source3/smbd/files.c
index 8d06e20f81..519f4945f2 100644
--- a/source3/smbd/files.c
+++ b/source3/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);