diff options
Diffstat (limited to 'source4/torture/torture.c')
-rw-r--r-- | source4/torture/torture.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/torture/torture.c b/source4/torture/torture.c index 9231fe45ed..803e0c6bd7 100644 --- a/source4/torture/torture.c +++ b/source4/torture/torture.c @@ -32,13 +32,16 @@ _PUBLIC_ int torture_failures=1; _PUBLIC_ int torture_seed=0; _PUBLIC_ int torture_numasync=100; -struct torture_suite *torture_root = NULL; +struct torture_suite *torture_root; bool torture_register_suite(struct torture_suite *suite) { if (!suite) return true; + if (torture_root == NULL) + torture_root = talloc_zero(talloc_autofree_context(), struct torture_suite); + return torture_suite_add_suite(torture_root, suite); } @@ -63,9 +66,6 @@ int torture_init(void) init_module_fn static_init[] = STATIC_torture_MODULES; init_module_fn *shared_init = load_samba_modules(NULL, "torture"); - torture_root = talloc_zero(talloc_autofree_context(), - struct torture_suite); - run_init_functions(static_init); run_init_functions(shared_init); |