From 8e4e408e3a96c0fb5540d2f9a99269c09226e4a4 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Fri, 12 Aug 2011 15:40:26 +1000 Subject: 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. --- source3/param/loadparm_ctx.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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. -- cgit