ldb: Fix mem allocation in torture test to satisfy sanitizer
authorSwen Schillig <swen@linux.ibm.com>
Mon, 29 Jul 2019 07:50:24 +0000 (09:50 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 8 Aug 2019 10:08:32 +0000 (10:08 +0000)
Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Matthias Dieter Wallnöfer <mdw@samba.org>
source4/torture/ldb/ldb.c

index 1de24cb..f377f9f 100644 (file)
@@ -1744,7 +1744,7 @@ static bool torture_ldb_unpack_and_filter(struct torture_context *torture,
 struct torture_suite *torture_ldb(TALLOC_CTX *mem_ctx)
 {
        int i;
-       struct ldb_val *bins = talloc_array(NULL, struct ldb_val, 2);
+       struct ldb_val *bins = talloc_array(mem_ctx, struct ldb_val, 2);
        struct torture_suite *suite = torture_suite_create(mem_ctx, "ldb");
 
        if (suite == NULL) {