s4: torture: Add TALLOC_CTX * to torture_smb2_compound_find_init() and torture_smb2_c...
authorJeremy Allison <jra@samba.org>
Mon, 24 Apr 2017 22:13:10 +0000 (15:13 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 5 May 2017 13:52:12 +0000 (15:52 +0200)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
source4/torture/smb2/compound.c
source4/torture/smb2/smb2.c

index 14805760bd428af31d5eaf34f48887e7666dc0af..e501870cf640b887fa6b0e8443c7102a7d804927 100644 (file)
@@ -1214,9 +1214,9 @@ done:
        return ret;
 }
 
-struct torture_suite *torture_smb2_compound_init(void)
+struct torture_suite *torture_smb2_compound_init(TALLOC_CTX *ctx)
 {
-       struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "compound");
+       struct torture_suite *suite = torture_suite_create(ctx, "compound");
 
        torture_suite_add_1smb2_test(suite, "related1", test_compound_related1);
        torture_suite_add_1smb2_test(suite, "related2", test_compound_related2);
@@ -1236,9 +1236,9 @@ struct torture_suite *torture_smb2_compound_init(void)
        return suite;
 }
 
-struct torture_suite *torture_smb2_compound_find_init(void)
+struct torture_suite *torture_smb2_compound_find_init(TALLOC_CTX *ctx)
 {
-       struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "compound_find");
+       struct torture_suite *suite = torture_suite_create(ctx, "compound_find");
 
        torture_suite_add_1smb2_test(suite, "compound_find_related", test_compound_find_related);
        torture_suite_add_1smb2_test(suite, "compound_find_unrelated", test_compound_find_unrelated);
index 14fd339199eb7880081cfee756e2a7bcb9b9995c..cb1eb767a9e4d2cecd50b236392138c056794456 100644 (file)
@@ -161,8 +161,8 @@ NTSTATUS torture_smb2_init(TALLOC_CTX *ctx)
        torture_suite_add_suite(suite, torture_smb2_durable_v2_open_init());
        torture_suite_add_suite(suite, torture_smb2_dir_init());
        torture_suite_add_suite(suite, torture_smb2_lease_init());
-       torture_suite_add_suite(suite, torture_smb2_compound_init());
-       torture_suite_add_suite(suite, torture_smb2_compound_find_init());
+       torture_suite_add_suite(suite, torture_smb2_compound_init(suite));
+       torture_suite_add_suite(suite, torture_smb2_compound_find_init(suite));
        torture_suite_add_suite(suite, torture_smb2_oplocks_init());
        torture_suite_add_suite(suite, torture_smb2_kernel_oplocks_init());
        torture_suite_add_suite(suite, torture_smb2_streams_init());