summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-02 18:18:53 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-02 18:52:29 +1100
commitfde50c633f3a48c8e63718903a77e2c1ecc12a55 (patch)
tree85992617030185fbad5f3ca157d6be4424eefc17 /lib
parent1b4bbec523f2bf20d91c177e7fdb4b7f87431926 (diff)
downloadsamba-fde50c633f3a48c8e63718903a77e2c1ecc12a55.tar.gz
samba-fde50c633f3a48c8e63718903a77e2c1ecc12a55.tar.bz2
samba-fde50c633f3a48c8e63718903a77e2c1ecc12a55.zip
talloc: a useful bit of debug code
this is useful when tracking down talloc loops. It is probably too expensive to have on by default.
Diffstat (limited to 'lib')
-rw-r--r--lib/talloc/talloc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
index 51273dd612..bc1c697789 100644
--- 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);
}