From 369f5fd1d7a6e6298bc3cbe01e3aaed0106f6cf4 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 15 Dec 2000 01:02:11 +0000 Subject: Fixed memory leaks in lsa_XX calls. Fixed memory leaks in smbcacls. Merged in fixes from appliance-head and 2.2. Fixed multiple connection.tdb open problem. Jeremy. (This used to be commit 0a40bc83e14c69a09948ec09bb6fc5026c4f4c14) --- source3/lib/talloc.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/lib/talloc.c') diff --git a/source3/lib/talloc.c b/source3/lib/talloc.c index acc6204bed..a04bd2561b 100644 --- a/source3/lib/talloc.c +++ b/source3/lib/talloc.c @@ -96,6 +96,9 @@ void talloc_destroy_pool(TALLOC_CTX *t) { struct talloc_chunk *c; + if (!t) + return; + while (t->list) { c = t->list->next; free(t->list->ptr); @@ -109,6 +112,8 @@ void talloc_destroy_pool(TALLOC_CTX *t) /* destroy a whole pool including the context */ void talloc_destroy(TALLOC_CTX *t) { + if (!t) + return; talloc_destroy_pool(t); free(t); } -- cgit