From 2f844bf447a98b802daa4b8d552ea4530e7f6108 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 8 Aug 2001 16:54:16 +0000 Subject: Change all realloc() statements to Realloc() (ecxept for tdb.c) changed some code to exploit the fact that Realloc(NULL, size) == malloc(size) fixed some possible mem leaks, or seg faults. thanks to andreas moroder (mallocs not checked in client/client.c, client/smbumount.c) (This used to be commit 7f33c01688b825ab2fa9bbb2730bff4f2fa352be) --- source3/lib/talloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/talloc.c') diff --git a/source3/lib/talloc.c b/source3/lib/talloc.c index a8ee481744..cfd130e888 100644 --- a/source3/lib/talloc.c +++ b/source3/lib/talloc.c @@ -90,7 +90,7 @@ void *talloc_realloc(TALLOC_CTX *t, void *ptr, size_t size) for (tc=t->list; tc; tc=tc->next) { if (tc->ptr == ptr) { - ptr = realloc(ptr, size); + ptr = Realloc(ptr, size); if (ptr) { t->total_alloc_size += (size - tc->size); tc->size = size; -- cgit