s4: torture: Pass the new talloc context into torture_init().
[garming/samba-autobuild/.git] / source4 / torture / torture.c
index 01089219b876cbea9938580fcc188ee5cf9e461f..3ef1f3b49ba199ba495032c20b79e3c965cedebd 100644 (file)
@@ -44,15 +44,15 @@ bool torture_register_suite(struct torture_suite *suite)
        return torture_suite_add_suite(torture_root, suite);
 }
 
-_PUBLIC_ int torture_init(void)
+_PUBLIC_ int torture_init(TALLOC_CTX *mem_ctx)
 {
 #define _MODULE_PROTO(init) extern NTSTATUS init(TALLOC_CTX *);
        STATIC_smbtorture_MODULES_PROTO;
        init_module_fn static_init[] = { STATIC_smbtorture_MODULES };
-       init_module_fn *shared_init = load_samba_modules(NULL, "smbtorture");
+       init_module_fn *shared_init = load_samba_modules(mem_ctx, "smbtorture");
 
-       run_init_functions(NULL, static_init);
-       run_init_functions(NULL, shared_init);
+       run_init_functions(mem_ctx, static_init);
+       run_init_functions(mem_ctx, shared_init);
 
        talloc_free(shared_init);