diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-07-13 20:32:50 +0200 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-08-24 16:29:57 +1000 |
commit | 2c664db7494da12e1738dbcbdece41374f561661 (patch) | |
tree | 5d9b353d2a6953088a6e9fc542c358da4e14d9de /lib/talloc | |
parent | d1895d2fee9eec6f0b16dd38728b34d2f8233b0c (diff) | |
download | samba-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.c | 4 |
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)); } |