s4/asn1: local TALLOC_CTX should be child of torture_context
authorKamen Mazdrashki <kamen.mazdrashki@postpath.com>
Fri, 25 Sep 2009 22:36:01 +0000 (01:36 +0300)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Thu, 1 Oct 2009 21:13:00 +0000 (23:13 +0200)
lib/util/tests/asn1_tests.c

index ab2e242be370e99323e66e3a0ca10aa6771b4fe5..56363c236d273e07224f82cf0ef90aeb225a9b9c 100644 (file)
@@ -102,7 +102,7 @@ static bool test_ber_write_OID_String(struct torture_context *tctx)
        TALLOC_CTX *mem_ctx;
        struct oid_data *data = oid_data_ok;
 
-       mem_ctx = talloc_new(NULL);
+       mem_ctx = talloc_new(tctx);
 
        for (i = 0; i < ARRAY_SIZE(oid_data_ok); i++) {
                torture_assert(tctx, ber_write_OID_String(&blob, data[i].oid),
@@ -159,7 +159,7 @@ static bool test_ber_write_partial_OID_String(struct torture_context *tctx)
        TALLOC_CTX *mem_ctx;
        struct oid_data *data = oid_data_ok;
 
-       mem_ctx = talloc_new(NULL);
+       mem_ctx = talloc_new(tctx);
 
        /* ber_write_partial_OID_String() should work with not partial OIDs also */
        for (i = 0; i < ARRAY_SIZE(oid_data_ok); i++) {