summaryrefslogtreecommitdiff
path: root/source3/smbd/open.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-01-09 17:11:04 -0800
committerJeremy Allison <jra@samba.org>2008-01-09 17:11:04 -0800
commit253fbf1a6ece5c8dc9759e3535b7f9fa46883c1b (patch)
tree3e4abe3bc537565b45699fbffaf1a8c0fcbc7f99 /source3/smbd/open.c
parent9003e8e50fd308bb66bfbd635193e725b2442cbb (diff)
downloadsamba-253fbf1a6ece5c8dc9759e3535b7f9fa46883c1b.tar.gz
samba-253fbf1a6ece5c8dc9759e3535b7f9fa46883c1b.tar.bz2
samba-253fbf1a6ece5c8dc9759e3535b7f9fa46883c1b.zip
Make use of talloc_pool in the main codepaths. Remove the sub-contexts.
Jeremy. (This used to be commit bc932b8ad4396f76b71c43efe9a6346f89c3632c)
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r--source3/smbd/open.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 6aef99ff0e..037ab633e3 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -125,7 +125,7 @@ static NTSTATUS change_dir_owner_to_parent(connection_struct *conn,
char *saved_dir = NULL;
SMB_STRUCT_STAT sbuf;
SMB_STRUCT_STAT parent_st;
- TALLOC_CTX *ctx = talloc_stackframe();
+ TALLOC_CTX *ctx = talloc_tos();
NTSTATUS status = NT_STATUS_OK;
int ret;
@@ -135,7 +135,6 @@ static NTSTATUS change_dir_owner_to_parent(connection_struct *conn,
DEBUG(0,("change_dir_owner_to_parent: failed to stat parent "
"directory %s. Error was %s\n",
inherit_from_dir, strerror(errno) ));
- TALLOC_FREE(ctx);
return status;
}
@@ -152,7 +151,6 @@ static NTSTATUS change_dir_owner_to_parent(connection_struct *conn,
DEBUG(0,("change_dir_owner_to_parent: failed to get "
"current working directory. Error was %s\n",
strerror(errno)));
- TALLOC_FREE(ctx);
return status;
}
@@ -202,7 +200,6 @@ static NTSTATUS change_dir_owner_to_parent(connection_struct *conn,
out:
- TALLOC_FREE(ctx);
vfs_ChDir(conn,saved_dir);
return status;
}
@@ -2707,7 +2704,6 @@ NTSTATUS create_file(connection_struct *conn,
int *pinfo,
SMB_STRUCT_STAT *psbuf)
{
- TALLOC_CTX *frame = talloc_stackframe();
struct case_semantics_state *case_state = NULL;
SMB_STRUCT_STAT sbuf;
int info = FILE_WAS_OPENED;
@@ -2918,7 +2914,6 @@ NTSTATUS create_file(connection_struct *conn,
if (psbuf != NULL) {
*psbuf = sbuf;
}
- TALLOC_FREE(frame);
return NT_STATUS_OK;
fail:
@@ -2928,6 +2923,5 @@ NTSTATUS create_file(connection_struct *conn,
close_file(fsp, ERROR_CLOSE);
fsp = NULL;
}
- TALLOC_FREE(frame);
return status;
}