git.samba.org
/
ddiss
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b4bbec
)
talloc: a useful bit of debug code
author
Andrew Tridgell
<tridge@samba.org>
Fri, 2 Apr 2010 07:18:53 +0000
(18:18 +1100)
committer
Andrew Tridgell
<tridge@samba.org>
Fri, 2 Apr 2010 07:52:29 +0000
(18:52 +1100)
this is useful when tracking down talloc loops. It is probably too
expensive to have on by default.
lib/talloc/talloc.c
patch
|
blob
|
history
diff --git
a/lib/talloc/talloc.c
b/lib/talloc/talloc.c
index 51273dd6126904d62ada490b9ab26d73e70b1e06..bc1c6977895564edaa046595b4a40729ab535e45 100644
(file)
--- a/
lib/talloc/talloc.c
+++ b/
lib/talloc/talloc.c
@@
-754,6
+754,14
@@
void *_talloc_steal_loc(const void *new_ctx, const void *ptr, const char *locati
h->location);
}
}
+
+#if 0
+ /* this test is probably too expensive to have on in the
+ normal build, but it useful for debugging */
+ if (talloc_is_parent(new_ctx, ptr)) {
+ talloc_log("WARNING: stealing into talloc child at %s\n", location);
+ }
+#endif
return _talloc_steal_internal(new_ctx, ptr);
}