diff options
author | Jeremy Allison <jra@samba.org> | 2017-04-24 14:27:36 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-05-05 15:52:11 +0200 |
commit | 1d6667381cfe568be2a0731225a6fed332343dc8 (patch) | |
tree | dabf3ee18bf7ff3e4c934d10084a2820f0e0579c /source4 | |
parent | 6341d3d59f2cee3478e02eb0a6f6c96f31bda513 (diff) | |
download | samba-1d6667381cfe568be2a0731225a6fed332343dc8.tar.gz |
s4: torture: Pass the new talloc context into torture_init().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/smbtorture.c | 2 | ||||
-rw-r--r-- | source4/torture/smbtorture.h | 2 | ||||
-rw-r--r-- | source4/torture/torture.c | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c index 13fe203ff64..622f3eb15ea 100644 --- a/source4/torture/smbtorture.c +++ b/source4/torture/smbtorture.c @@ -584,7 +584,7 @@ int main(int argc, const char *argv[]) } } } else { - torture_init(); + torture_init(mem_ctx); } if (list_testsuites) { diff --git a/source4/torture/smbtorture.h b/source4/torture/smbtorture.h index 0a0647d6594..7480f241d97 100644 --- a/source4/torture/smbtorture.h +++ b/source4/torture/smbtorture.h @@ -34,7 +34,7 @@ extern int torture_failures; extern int torture_numasync; struct torture_test; -int torture_init(void); +int torture_init(TALLOC_CTX *); bool torture_register_suite(struct torture_suite *suite); void torture_shell(struct torture_context *tctx); void torture_print_testsuites(bool structured); diff --git a/source4/torture/torture.c b/source4/torture/torture.c index 01089219b87..3ef1f3b49ba 100644 --- a/source4/torture/torture.c +++ b/source4/torture/torture.c @@ -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); |