summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-09-25 15:56:33 -0700
committerVolker Lendecke <vl@samba.org>2010-09-26 03:29:28 +0200
commit8c55a9b459a7f54ab505954f2d1d66538dd98d1b (patch)
tree8c8d54aab386b7d7f018d38ad6ca95fe1b8f5389 /source3
parentc4efae77fae88163b119ac71e8ed3220fb1f73b4 (diff)
downloadsamba-8c55a9b459a7f54ab505954f2d1d66538dd98d1b.tar.gz
samba-8c55a9b459a7f54ab505954f2d1d66538dd98d1b.tar.bz2
samba-8c55a9b459a7f54ab505954f2d1d66538dd98d1b.zip
s3: Remove talloc_autofree_context() from messaging_tdb_parent_init()
Diffstat (limited to 'source3')
-rw-r--r--source3/include/messages.h2
-rw-r--r--source3/lib/messages_local.c5
-rw-r--r--source3/smbd/server.c2
3 files changed, 4 insertions, 5 deletions
diff --git a/source3/include/messages.h b/source3/include/messages.h
index bf5e5de26c..d4f7d2081b 100644
--- a/source3/include/messages.h
+++ b/source3/include/messages.h
@@ -111,7 +111,7 @@ NTSTATUS messaging_tdb_init(struct messaging_context *msg_ctx,
TALLOC_CTX *mem_ctx,
struct messaging_backend **presult);
-bool messaging_tdb_parent_init(void);
+bool messaging_tdb_parent_init(TALLOC_CTX *mem_ctx);
NTSTATUS messaging_ctdbd_init(struct messaging_context *msg_ctx,
TALLOC_CTX *mem_ctx,
diff --git a/source3/lib/messages_local.c b/source3/lib/messages_local.c
index c475773a31..542d49e2dd 100644
--- a/source3/lib/messages_local.c
+++ b/source3/lib/messages_local.c
@@ -133,7 +133,7 @@ NTSTATUS messaging_tdb_init(struct messaging_context *msg_ctx,
return NT_STATUS_OK;
}
-bool messaging_tdb_parent_init(void)
+bool messaging_tdb_parent_init(TALLOC_CTX *mem_ctx)
{
struct tdb_wrap *db;
@@ -143,8 +143,7 @@ bool messaging_tdb_parent_init(void)
* work.
*/
- db = tdb_wrap_open(talloc_autofree_context(),
- lock_path("messages.tdb"), 0,
+ db = tdb_wrap_open(mem_ctx, lock_path("messages.tdb"), 0,
TDB_CLEAR_IF_FIRST|TDB_DEFAULT|TDB_VOLATILE,
O_RDWR|O_CREAT,0600);
if (db == NULL) {
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 8a55f933f7..6ae678dbde 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -1126,7 +1126,7 @@ extern void build_options(bool screen);
if (!locking_init())
exit(1);
- if (!messaging_tdb_parent_init()) {
+ if (!messaging_tdb_parent_init(smbd_event_context())) {
exit(1);
}