mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-03 20:40:05 -05:00
ITS#2974 fix hole array allocation
This commit is contained in:
parent
5f9a87c041
commit
896271195a
1 changed files with 3 additions and 3 deletions
|
|
@ -218,6 +218,7 @@ static int bdb_tool_next_id(
|
|||
dnParent( &dn, &pdn );
|
||||
e->e_nname = pdn;
|
||||
rc = bdb_tool_next_id( op, tid, e, text, 1 );
|
||||
e->e_nname = dn;
|
||||
if ( rc ) {
|
||||
return rc;
|
||||
}
|
||||
|
|
@ -236,7 +237,6 @@ static int bdb_tool_next_id(
|
|||
#endif
|
||||
return rc;
|
||||
}
|
||||
e->e_nname = dn;
|
||||
rc = bdb_dn2id_add( op, tid, ei, e );
|
||||
if ( rc ) {
|
||||
snprintf( text->bv_val, text->bv_len,
|
||||
|
|
@ -252,10 +252,10 @@ static int bdb_tool_next_id(
|
|||
} else if ( hole ) {
|
||||
if ( nholes == nhmax - 1 ) {
|
||||
if ( holes == hbuf ) {
|
||||
holes = ch_malloc( nhmax * sizeof(ID) * 2 );
|
||||
holes = ch_malloc( nhmax * sizeof(dn_id) * 2 );
|
||||
AC_MEMCPY( holes, hbuf, sizeof(hbuf) );
|
||||
} else {
|
||||
holes = ch_realloc( holes, nhmax * sizeof(ID) * 2 );
|
||||
holes = ch_realloc( holes, nhmax * sizeof(dn_id) * 2 );
|
||||
}
|
||||
nhmax *= 2;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue