summaryrefslogtreecommitdiff
path: root/source3/lib/talloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/talloc.c')
-rw-r--r--source3/lib/talloc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/lib/talloc.c b/source3/lib/talloc.c
index 35d4ddd211..31594d2a01 100644
--- a/source3/lib/talloc.c
+++ b/source3/lib/talloc.c
@@ -81,7 +81,7 @@ void *talloc(TALLOC_CTX *t, size_t size)
}
/* destroy a whole pool */
-void talloc_destroy(TALLOC_CTX *t)
+void talloc_destroy_pool(TALLOC_CTX *t)
{
struct talloc_chunk *c;
@@ -92,5 +92,12 @@ void talloc_destroy(TALLOC_CTX *t)
t->list = c;
}
+ t->list = NULL;
+}
+
+/* destroy a whole pool including the context */
+void talloc_destroy(TALLOC_CTX *t)
+{
+ talloc_destroy_pool(t);
free(t);
}