From 06731bc28f5bff963f75451a0d7dd7445e94407c Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 18 Jul 2012 15:07:28 +0930 Subject: source3/netapi: fix only caller which doesn't set up a talloc_stackframe() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit libnetapi_free() needs a stackframe too; looked like Andrew and Günther missed this in a37de9a95974c138d264d9cb0c7829bb426bb2d6. Signed-off-by: Rusty Russell --- source3/lib/netapi/netapi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/lib/netapi/netapi.c b/source3/lib/netapi/netapi.c index 34609ff13e..b1586ebee6 100644 --- a/source3/lib/netapi/netapi.c +++ b/source3/lib/netapi/netapi.c @@ -162,10 +162,13 @@ NET_API_STATUS libnetapi_getctx(struct libnetapi_ctx **ctx) NET_API_STATUS libnetapi_free(struct libnetapi_ctx *ctx) { + TALLOC_CTX *frame; + if (!ctx) { return NET_API_STATUS_SUCCESS; } + frame = talloc_stackframe(); libnetapi_samr_free(ctx); libnetapi_shutdown_cm(ctx); @@ -190,6 +193,7 @@ NET_API_STATUS libnetapi_free(struct libnetapi_ctx *ctx) TALLOC_FREE(ctx); gfree_debugsyms(); + talloc_free(frame); return NET_API_STATUS_SUCCESS; } -- cgit