diff options
author | Simo Sorce <idra@samba.org> | 2001-08-08 16:54:16 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2001-08-08 16:54:16 +0000 |
commit | 2f844bf447a98b802daa4b8d552ea4530e7f6108 (patch) | |
tree | 7beda0672e5fcc15125a7643d4d5fdef6f02b49e /source3/passdb | |
parent | 0897979a8b0976e03a84ccaf6a70cbaa62bbd195 (diff) | |
download | samba-2f844bf447a98b802daa4b8d552ea4530e7f6108.tar.gz samba-2f844bf447a98b802daa4b8d552ea4530e7f6108.tar.bz2 samba-2f844bf447a98b802daa4b8d552ea4530e7f6108.zip |
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)
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/ldap.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) { |