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
{
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));
status = libnetapi_net_init(&ctx);
if (status != 0) {
+ talloc_free(frame);
return false;
}
*ctx_p = ctx;
+ talloc_free(frame);
return true;
}