From 1c211a2e43db46c649a963ec883481cc4321870a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 10 Jan 2007 11:50:33 +0000 Subject: r20650: revert a bunch of code I didn't mean to commit yet (This used to be commit b3e2d4908781781a487eaeb683d22eb967e5597d) --- source4/lib/talloc/testsuite.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'source4/lib/talloc/testsuite.c') diff --git a/source4/lib/talloc/testsuite.c b/source4/lib/talloc/testsuite.c index dbfe3e4417..88ed638252 100644 --- a/source4/lib/talloc/testsuite.c +++ b/source4/lib/talloc/testsuite.c @@ -1028,39 +1028,6 @@ static bool test_autofree(void) return true; } -static bool test_incref(void) -{ - void *top = talloc_new(NULL); - char *a = talloc_strdup(top, "/"); - char *b = talloc_strdup(a,"/b"); - char *c = talloc_strdup(b,"/b/a"); - - // Make a have some more children - talloc_strdup(a,"/c"); - talloc_strdup(a,"/d"); - talloc_strdup(a,"/e"); - - // Now b has some more other children. - talloc_strdup(b,"/b/b"); - - //Now we incref c presumably because we want to keep it valid: - talloc_increase_ref_count(c); - - // I am freeing a here, but I expect c to still be valid because I have - // increased reference for it just above. - talloc_free(a); - - talloc_report_full(NULL, stdout); - - // This is where talloc aborts, valgrind indicates a double free - talloc_free(c); - - CHECK_BLOCKS("top", top, 1); - - return true; -}; - - struct torture_context; bool torture_local_talloc(struct torture_context *tctx) { @@ -1077,7 +1044,6 @@ bool torture_local_talloc(struct torture_context *tctx) ret &= test_ref4(); ret &= test_unlink1(); ret &= test_misc(); - ret &= test_incref(); ret &= test_realloc(); ret &= test_realloc_child(); ret &= test_steal(); -- cgit