summaryrefslogtreecommitdiffstats
path: root/source/lib/talloc.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-12-26 08:32:30 +0000
committerJeremy Allison <jra@samba.org>2001-12-26 08:32:30 +0000
commit26e4c4099c61c7ba9f2153e56061bea9882553d9 (patch)
treeb68969a82c21508f28f511fc7263e5242351e47c /source/lib/talloc.c
parent5e3491784277dd90180ef199d2fa258614958545 (diff)
downloadsamba-26e4c4099c61c7ba9f2153e56061bea9882553d9.tar.gz
samba-26e4c4099c61c7ba9f2153e56061bea9882553d9.tar.xz
samba-26e4c4099c61c7ba9f2153e56061bea9882553d9.zip
Get religion on using SAFE_FREE.
Jeremy.
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. */