From 127352c78c0328d59d742f0b4520ebaac6307854 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 18 Jul 2012 15:07:28 +0930 Subject: source4/torture: add talloc_stackframe() We need a stackframe to call lp_load(). Signed-off-by: Rusty Russell Autobuild-User(master): Rusty Russell Autobuild-Date(master): Wed Jul 18 09:31:07 CEST 2012 on sn-devel-104 --- source4/torture/libnetapi/libnetapi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source4/torture/libnetapi/libnetapi.c b/source4/torture/libnetapi/libnetapi.c index 3476f1d7b9..c5169760aa 100644 --- a/source4/torture/libnetapi/libnetapi.c +++ b/source4/torture/libnetapi/libnetapi.c @@ -31,6 +31,7 @@ bool torture_libnetapi_init_context(struct torture_context *tctx, { NET_API_STATUS status; struct libnetapi_ctx *ctx; + TALLOC_CTX *frame = talloc_stackframe(); if (!lp_load(lpcfg_configfile(tctx->lp_ctx), true, false, false, true)) { fprintf(stderr, "error loading %s\n", lpcfg_configfile(tctx->lp_ctx)); @@ -42,6 +43,7 @@ bool torture_libnetapi_init_context(struct torture_context *tctx, status = libnetapi_net_init(&ctx); if (status != 0) { + talloc_free(frame); return false; } @@ -52,6 +54,7 @@ bool torture_libnetapi_init_context(struct torture_context *tctx, *ctx_p = ctx; + talloc_free(frame); return true; } -- cgit