mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-04 06:01:23 -05:00
need to use ch_malloc/realloc
This commit is contained in:
parent
e4b507dfe9
commit
0f0122abdd
2 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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],
|
||||
|
|
|
|||
Loading…
Reference in a new issue