summaryrefslogtreecommitdiff
path: root/source3/lib/talloctort.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/talloctort.c')
-rw-r--r--source3/lib/talloctort.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/lib/talloctort.c b/source3/lib/talloctort.c
index 61f9532f6e..f43a4e4f9f 100644
--- a/source3/lib/talloctort.c
+++ b/source3/lib/talloctort.c
@@ -41,16 +41,21 @@ int main(void)
p = talloc(ctx[i], size);
if (!p) {
fprintf(stderr,
- "failed to talloc %0.f bytes\n", size);
+ "failed to talloc %.0f bytes\n",
+ (double) size);
exit(1);
}
}
}
for (i = 0; i < NCTX; i++) {
- printf("talloc@%p %-40s %db\n", ctx[i], ctx[i]->name,
- ctx[i]->total_alloc_size);
+ printf("talloc@%p %-40s %db\n", ctx[i],
+ talloc_pool_name(ctx[i]),
+ talloc_pool_size(ctx[i]));
}
+ for (i = NCTX - 1; i >= 0; i--)
+ talloc_destroy(ctx[i]);
+
return 0;
}