From 3c2f4df55532b17ef4957604ffe411eb885edbaf Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 1 Jul 2009 16:36:10 +1000 Subject: [PATCH] a talloc_realloc() to zero size needs to use an unambiguous free --- lib/talloc/talloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c index bf2fb1f72e9..e68b6539dc6 100644 --- a/lib/talloc/talloc.c +++ b/lib/talloc/talloc.c @@ -1067,7 +1067,7 @@ void *_talloc_realloc(const void *context, void *ptr, size_t size, const char *n /* size zero is equivalent to free() */ if (unlikely(size == 0)) { - talloc_free(ptr); + talloc_unlink(context, ptr); return NULL; } -- 2.11.4.GIT