summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2011-08-12 15:40:26 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-08-13 12:30:50 +1000
commit8e4e408e3a96c0fb5540d2f9a99269c09226e4a4 (patch)
tree86e841476a49085e739b77e095ade5ae686c7d5c /source3/param
parent7c9ecf35fa92395ce46d1410ae0b343f6dc24774 (diff)
downloadsamba-8e4e408e3a96c0fb5540d2f9a99269c09226e4a4.tar.gz
samba-8e4e408e3a96c0fb5540d2f9a99269c09226e4a4.tar.bz2
samba-8e4e408e3a96c0fb5540d2f9a99269c09226e4a4.zip
s3-param: Make sure we have talloc stack frame before calling in s3 code
When loading parameters as s4 context in s3 code, ensure we have a talloc stack frame. This is required for python wrapping s3 params.
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm_ctx.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/param/loadparm_ctx.c b/source3/param/loadparm_ctx.c
index 2289f6bc29..3aadda1bd0 100644
--- a/source3/param/loadparm_ctx.c
+++ b/source3/param/loadparm_ctx.c
@@ -22,7 +22,14 @@
static bool lp_load_for_s4_ctx(const char *filename)
{
- return lp_load(filename, false, false, false, false);
+ TALLOC_CTX *mem_ctx;
+ bool status;
+
+ mem_ctx = talloc_stackframe();
+ status = lp_load(filename, false, false, false, false);
+ talloc_free(mem_ctx);
+
+ return status;
}
/* These are in the order that they appear in the s4 loadparm file.