From: Howard Chu Date: Sat, 8 Dec 2001 13:07:01 +0000 (+0000) Subject: Fix previous commit... X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~699 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=21c5674d348abb6f9111af1b3a0076ddced1a42b;p=openldap Fix previous commit... --- diff --git a/servers/slapd/back-bdb/dn2id.c b/servers/slapd/back-bdb/dn2id.c index bac5ff3586..d3735e4160 100644 --- a/servers/slapd/back-bdb/dn2id.c +++ b/servers/slapd/back-bdb/dn2id.c @@ -682,7 +682,11 @@ bdb_dn2id_add( idNode *n; nrlen = dn_rdnlen( be, e->e_ndn ); - rlen = dn_rdnlen( be, e->e_dn ); + if (nrlen) { + rlen = dn_rdnlen( be, e->e_dn ); + } else { + rlen = 0; + } d = ch_malloc(sizeof(diskNode) + rlen + nrlen + 2); d->rdn.bv_len = rlen;