summaryrefslogtreecommitdiffstats
path: root/source/lib/talloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/lib/talloc.c')
-rw-r--r--source/lib/talloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/lib/talloc.c b/source/lib/talloc.c
index cfd130e888b..1d8bc265802 100644
--- a/source/lib/talloc.c
+++ b/source/lib/talloc.c
@@ -62,7 +62,7 @@ void *talloc(TALLOC_CTX *t, size_t size)
tc = malloc(sizeof(*tc));
if (!tc) {
- free(p);
+ SAFE_FREE(p);
return NULL;
}
@@ -112,8 +112,8 @@ void talloc_destroy_pool(TALLOC_CTX *t)
while (t->list) {
c = t->list->next;
- if (t->list->ptr) free(t->list->ptr);
- free(t->list);
+ SAFE_FREE(t->list->ptr);
+ SAFE_FREE(t->list);
t->list = c;
}
@@ -128,7 +128,7 @@ void talloc_destroy(TALLOC_CTX *t)
return;
talloc_destroy_pool(t);
memset(t, 0, sizeof(*t));
- free(t);
+ SAFE_FREE(t);
}
/* return the current total size of the pool. */