]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-tools: Free temporary memory context before exiting
authorAmitay Isaacs <amitay@gmail.com>
Fri, 5 Aug 2016 03:56:40 +0000 (13:56 +1000)
committerMartin Schwenke <martins@samba.org>
Mon, 8 Aug 2016 06:17:33 +0000 (08:17 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/tools/ctdb.c

index eca98d1a31d6c157de5ae24122d8ec38dc8a8013..c4c0b4ea8a2ce953030fac5a4daae4d3a3dc1a0d 100644 (file)
@@ -6454,7 +6454,9 @@ static int process_command(const struct ctdb_cmd *cmd, int argc,
                        goto fail;
                }
 
-               return cmd->fn(tmp_ctx, NULL, argc-1, argv+1);
+               ret = cmd->fn(tmp_ctx, NULL, argc-1, argv+1);
+               talloc_free(tmp_ctx);
+               return ret;
        }
 
        ctdb = talloc_zero(tmp_ctx, struct ctdb_context);