From 896271195a9edbd4486991b87f1df0f8dcd5c475 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 2 Mar 2004 23:01:04 +0000 Subject: [PATCH] ITS#2974 fix hole array allocation --- servers/slapd/back-bdb/tools.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/servers/slapd/back-bdb/tools.c b/servers/slapd/back-bdb/tools.c index 4f521b2ccf..226866431c 100644 --- a/servers/slapd/back-bdb/tools.c +++ b/servers/slapd/back-bdb/tools.c @@ -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; } -- 2.39.5