From 68e64e768b80c3e0b04749b78436a9128c08e3de Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 1 Jun 1999 00:04:36 +0000 Subject: [PATCH] Use ber_mem* functions. --- clients/tools/ldapmodify.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 ); } -- 2.39.5