git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
201d7c9
)
talloc: report the size of reference handles as 0
author
Stefan Metzmacher
<metze@samba.org>
Mon, 13 Jul 2009 18:32:50 +0000
(20:32 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Mon, 13 Jul 2009 18:54:29 +0000
(20:54 +0200)
metze
lib/talloc/talloc.c
patch
|
blob
|
history
diff --git
a/lib/talloc/talloc.c
b/lib/talloc/talloc.c
index a48cc8a44e1e1f70ee7ceae19d604a721bc3757e..a1b158a42cd129674d1d0854ce43a96638853edb 100644
(file)
--- a/
lib/talloc/talloc.c
+++ b/
lib/talloc/talloc.c
@@
-1113,7
+1113,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));
}