From: Kurt Zeilenga Date: Sun, 9 Mar 2003 20:15:30 +0000 (+0000) Subject: need to use ch_malloc/realloc X-Git-Tag: NO_SLAP_OP_BLOCKS~160 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0f0122abdd9aad010fe46e89969f4462b1c1f853;p=openldap need to use ch_malloc/realloc --- diff --git a/servers/slapd/back-bdb/tools.c b/servers/slapd/back-bdb/tools.c index cd7a446041..446b9712ba 100644 --- a/servers/slapd/back-bdb/tools.c +++ b/servers/slapd/back-bdb/tools.c @@ -182,10 +182,10 @@ int bdb_tool_next_id( } else if ( hole ) { if ( nholes == nhmax - 1 ) { if ( holes == hbuf ) { - holes = malloc( nhmax * sizeof(ID) * 2 ); + holes = ch_malloc( nhmax * sizeof(ID) * 2 ); AC_MEMCPY( holes, hbuf, sizeof(hbuf) ); } else { - holes = realloc( holes, nhmax * sizeof(ID) * 2 ); + holes = ch_realloc( holes, nhmax * sizeof(ID) * 2 ); } nhmax *= 2; } diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 5869fe418c..38f804466b 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -107,7 +107,7 @@ void slapd_slp_init( const char* urls ) { if( strcmp( slapd_srvurls[i], "ldap:///" ) == 0) { char *host = ldap_pvt_get_fqdn( NULL ); if ( host != NULL ) { - slapd_srvurls[i] = (char *) realloc( slapd_srvurls[i], + slapd_srvurls[i] = (char *) ch_realloc( slapd_srvurls[i], strlen( host ) + sizeof( LDAP_SRVTYPE_PREFIX ) ); strcpy( lutil_strcopy(slapd_srvurls[i], @@ -119,7 +119,7 @@ void slapd_slp_init( const char* urls ) { } else if ( strcmp( slapd_srvurls[i], "ldaps:///" ) == 0) { char *host = ldap_pvt_get_fqdn( NULL ); if ( host != NULL ) { - slapd_srvurls[i] = (char *) realloc( slapd_srvurls[i], + slapd_srvurls[i] = (char *) ch_realloc( slapd_srvurls[i], strlen( host ) + sizeof( LDAPS_SRVTYPE_PREFIX ) ); strcpy( lutil_strcopy(slapd_srvurls[i],