From 5da75f5c3631247615efdf73fae2481df6908cb8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 23 May 2006 03:51:44 +0000 Subject: r15824: fixed a subtle talloc bug to do with memory context loops. When you have a structure that references one of its parents, and a parent of that parent is freed, then the whole structure should be freed, not just the reference. this was found by the change notify code, as a side effect of fixing the memory leak yesterday (This used to be commit 70531dcaeeb9314d410baa0d285df6a265311541) --- source4/lib/talloc/talloc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/lib/talloc/talloc.h') diff --git a/source4/lib/talloc/talloc.h b/source4/lib/talloc/talloc.h index 68bf24e0b8..99410241a6 100644 --- a/source4/lib/talloc/talloc.h +++ b/source4/lib/talloc/talloc.h @@ -137,6 +137,7 @@ void *talloc_autofree_context(void); size_t talloc_get_size(const void *ctx); void *talloc_find_parent_byname(const void *ctx, const char *name); void talloc_show_parents(const void *context, FILE *file); +int talloc_is_parent(const void *context, const char *ptr); #endif -- cgit