From: Kurt Zeilenga Date: Tue, 1 Jun 1999 00:04:36 +0000 (+0000) Subject: Use ber_mem* functions. X-Git-Tag: OPENLDAP_REL_ENG_2_BP~451 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=68e64e768b80c3e0b04749b78436a9128c08e3de;p=openldap Use ber_mem* functions. --- diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index aa273848bc..3d3050b0c1 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -597,14 +597,14 @@ addmodifyop( LDAPMod ***pmodsp, int modop, char *attr, char *value, int vlen ) } if ( pmods == NULL || pmods[ i ] == NULL ) { - if (( pmods = (LDAPMod **)realloc( pmods, (i + 2) * + if (( pmods = (LDAPMod **)ber_memrealloc( pmods, (i + 2) * sizeof( LDAPMod * ))) == NULL ) { perror( "realloc" ); exit( 1 ); } *pmodsp = pmods; pmods[ i + 1 ] = NULL; - if (( pmods[ i ] = (LDAPMod *)calloc( 1, sizeof( LDAPMod ))) + if (( pmods[ i ] = (LDAPMod *)ber_memcalloc( 1, sizeof( LDAPMod ))) == NULL ) { perror( "calloc" ); exit( 1 ); @@ -643,7 +643,7 @@ addmodifyop( LDAPMod ***pmodsp, int modop, char *attr, char *value, int vlen ) } } else { bvp->bv_len = vlen; - if (( bvp->bv_val = (char *)malloc( vlen + 1 )) == NULL ) { + if (( bvp->bv_val = (char *)ber_memalloc( vlen + 1 )) == NULL ) { perror( "malloc" ); exit( 1 ); }