summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-07-18 15:07:28 +0930
committerRusty Russell <rusty@rustcorp.com.au>2012-07-18 09:31:07 +0200
commit127352c78c0328d59d742f0b4520ebaac6307854 (patch)
tree0193000ba9eda31081d5082c32b043948b7cc0d3 /source4/torture
parent06731bc28f5bff963f75451a0d7dd7445e94407c (diff)
downloadsamba-127352c78c0328d59d742f0b4520ebaac6307854.tar.gz
samba-127352c78c0328d59d742f0b4520ebaac6307854.tar.bz2
samba-127352c78c0328d59d742f0b4520ebaac6307854.zip
source4/torture: add talloc_stackframe()
We need a stackframe to call lp_load(). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date(master): Wed Jul 18 09:31:07 CEST 2012 on sn-devel-104
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/libnetapi/libnetapi.c3
1 files changed, 3 insertions, 0 deletions
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;
}