From: Howard Chu Date: Tue, 2 Mar 2004 23:14:25 +0000 (+0000) Subject: ITS#2974 fix from HEAD X-Git-Tag: OPENLDAP_REL_ENG_2_1_28~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79eced19a3b20bbe50674c6acb0007d625e9a23d;p=thirdparty%2Fopenldap.git ITS#2974 fix from HEAD --- diff --git a/servers/slapd/back-bdb/tools.c b/servers/slapd/back-bdb/tools.c index 7e3789af1a..3d98aca1b1 100644 --- a/servers/slapd/back-bdb/tools.c +++ b/servers/slapd/back-bdb/tools.c @@ -148,6 +148,7 @@ int bdb_tool_next_id( dnParent( &dn, &pdn ); e->e_nname = pdn; rc = bdb_tool_next_id( be, tid, e, text, 1 ); + e->e_nname = dn; if ( rc ) { return rc; } @@ -166,7 +167,6 @@ int bdb_tool_next_id( #endif return rc; } - e->e_nname = dn; rc = bdb_dn2id_add( be, tid, &pdn, e ); if ( rc ) { snprintf( text->bv_val, text->bv_len, @@ -182,10 +182,10 @@ 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; }