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/passdb/ldap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/passdb') diff --git a/source3/passdb/ldap.c b/source3/passdb/ldap.c index b520f521bd..9987990cc2 100644 --- a/source3/passdb/ldap.c +++ b/source3/passdb/ldap.c @@ -406,7 +406,7 @@ static void make_a_mod(LDAPMod ***modlist,int modop, char *attribute, char *valu if (mods[i] == NULL) { - mods = (LDAPMod **)realloc( mods, (i+2) * sizeof( LDAPMod * ) ); + mods = (LDAPMod **)Realloc( mods, (i+2) * sizeof( LDAPMod * ) ); if (mods == NULL) { DEBUG(0,("make_a_mod: out of memory!\n")); @@ -431,7 +431,7 @@ static void make_a_mod(LDAPMod ***modlist,int modop, char *attribute, char *valu { for ( ; mods[ i ]->mod_values[ j ] ! = NULL; j++ ); } - mods[ i ]->mod_values = (char **)realloc(mods[ i ]->mod_values, + mods[ i ]->mod_values = (char **)Realloc(mods[ i ]->mod_values, (j+2) * sizeof( char * )); if ( mods[ i ]->mod_values == NULL) { -- cgit