]> git.sur5r.net Git - openldap/commitdiff
Fix previous commit...
authorHoward Chu <hyc@openldap.org>
Sat, 8 Dec 2001 13:07:01 +0000 (13:07 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 8 Dec 2001 13:07:01 +0000 (13:07 +0000)
servers/slapd/back-bdb/dn2id.c

index bac5ff3586f10ec99b55a4ef19f7095fdd0548b3..d3735e416005157ee1a857e1127f0b1a2a7dae5d 100644 (file)
@@ -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;