summaryrefslogtreecommitdiff
path: root/lib/talloc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-07-13 20:32:50 +0200
committerAndrew Tridgell <tridge@samba.org>2009-08-24 16:29:57 +1000
commit2c664db7494da12e1738dbcbdece41374f561661 (patch)
tree5d9b353d2a6953088a6e9fc542c358da4e14d9de /lib/talloc
parentd1895d2fee9eec6f0b16dd38728b34d2f8233b0c (diff)
downloadsamba-2c664db7494da12e1738dbcbdece41374f561661.tar.gz
samba-2c664db7494da12e1738dbcbdece41374f561661.tar.bz2
samba-2c664db7494da12e1738dbcbdece41374f561661.zip
talloc: report the size of reference handles as 0
metze
Diffstat (limited to 'lib/talloc')
-rw-r--r--lib/talloc/talloc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
index 8e91b60c99..a65a69b4e2 100644
--- a/lib/talloc/talloc.c
+++ b/lib/talloc/talloc.c
@@ -1211,7 +1211,9 @@ size_t talloc_total_size(const void *ptr)
tc->flags |= TALLOC_FLAG_LOOP;
- total = tc->size;
+ if (likely(tc->name != TALLOC_MAGIC_REFERENCE)) {
+ total = tc->size;
+ }
for (c=tc->child;c;c=c->next) {
total += talloc_total_size(TC_PTR_FROM_CHUNK(c));
}