torture/smb2: fix crash bugs in the new SMB2-DIR tests
authorStefan Metzmacher <metze@samba.org>
Wed, 15 Jul 2009 08:49:41 +0000 (10:49 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 15 Jul 2009 08:53:13 +0000 (10:53 +0200)
metze

source4/torture/smb2/dir.c

index 79672ef03abcd203e1751cd24abf9510dcda91ee..e090c31ec9f1fa1e10adebd98cbf253ad3853fc9 100644 (file)
@@ -1083,7 +1083,7 @@ done:
 static bool test_file_index(struct torture_context *tctx,
                            struct smb2_tree *tree)
 {
-       TALLOC_CTX *mem_ctx = talloc_new(mem_ctx);
+       TALLOC_CTX *mem_ctx = talloc_new(tctx);
        const int num_files = 100;
        int resume_index = 4;
        int i;
@@ -1201,7 +1201,7 @@ done:
 static bool test_large_files(struct torture_context *tctx,
                             struct smb2_tree *tree)
 {
-       TALLOC_CTX *mem_ctx = talloc_new(mem_ctx);
+       TALLOC_CTX *mem_ctx = talloc_new(tctx);
        const int num_files = 2000;
        int i, j = 1, retry_count = 0;
        struct file_elem files[2000] = {};