diff options
author | Jeremy Allison <jra@samba.org> | 2001-12-26 08:32:30 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-12-26 08:32:30 +0000 |
commit | 26e4c4099c61c7ba9f2153e56061bea9882553d9 (patch) | |
tree | b68969a82c21508f28f511fc7263e5242351e47c /source/lib/talloc.c | |
parent | 5e3491784277dd90180ef199d2fa258614958545 (diff) | |
download | samba-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.c | 8 |
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. */ |