source3/netapi: fix only caller which doesn't set up a talloc_stackframe()
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 18 Jul 2012 05:37:28 +0000 (15:07 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 18 Jul 2012 05:37:28 +0000 (15:07 +0930)
libnetapi_free() needs a stackframe too; looked like Andrew and Günther
missed this in a37de9a95974c138d264d9cb0c7829bb426bb2d6.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
source3/lib/netapi/netapi.c

index 34609ff13e7bf5526ec068db39a2d0904d3567f8..b1586ebee61667c1e86bdcc1634f0a68665ba893 100644 (file)
@@ -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;
 }