]> git.ozlabs.org Git - ccan/blobdiff - ccan/talloc/test/run.c
talloc: use failtest to test failure paths.
[ccan] / ccan / talloc / test / run.c
index 06f9249a152ae71f04cd0d769f7e8a137330437a..564f1e85922d9bef65b1c3d7053b9e56cf3e7958 100644 (file)
@@ -948,7 +948,7 @@ int main(void)
 {
        struct torture_context *ctx;
 
-       plan_tests(288);
+       plan_tests(289);
        ctx = talloc_add_external(NULL, normal_realloc, test_lock, test_unlock);
 
        torture_local_talloc(NULL);
@@ -979,6 +979,10 @@ int main(void)
        ok(allocations_used() == 0, "%u allocations still used?",
           allocations_used());
 
+       /* This closes the leak, but make sure we're not freeing unexpected. */
+       ok1(!talloc_chunk_from_ptr(null_context)->child);
+       talloc_disable_null_tracking();
+       
        return exit_status();
 }