finished:
smbcli_rmdir(cli->tree, "\\masktest");
- talloc_free(mem_ctx);
}
poptContext pc;
int argc_new, i;
char **argv_new;
- TALLOC_CTX *mem_ctx;
+ TALLOC_CTX *mem_ctx = NULL;
enum {OPT_UNCLIST=1000};
struct poptOption long_options[] = {
POPT_AUTOHELP
setlinebuf(stdout);
seed = time(NULL);
+ mem_ctx = talloc_named_const(NULL, 0, "masktest_ctx");
+ if (mem_ctx == NULL) {
+ exit(1);
+ }
+
pc = poptGetContext("locktest", argc, argv, long_options,
POPT_CONTEXT_KEEP_FIRST);
if (!(argc_new >= 2)) {
usage(pc);
+ talloc_free(mem_ctx);
exit(1);
}
lp_ctx = cmdline_lp_ctx;
- mem_ctx = talloc_autofree_context();
-
ev = s4_event_context_init(mem_ctx);
gensec_init();
lpcfg_gensec_settings(mem_ctx, lp_ctx));
if (!cli) {
DEBUG(0,("Failed to connect to %s\n", share));
+ talloc_free(mem_ctx);
exit(1);
}
test_mask(argc_new-1, argv_new+1, mem_ctx, cli);
+ talloc_free(mem_ctx);
return(0);
}