]> git.sur5r.net Git - openldap/commitdiff
Fix another crasher if parent is NULL
authorLuke Howard <lukeh@openldap.org>
Tue, 19 Jul 2005 01:37:48 +0000 (01:37 +0000)
committerLuke Howard <lukeh@openldap.org>
Tue, 19 Jul 2005 01:37:48 +0000 (01:37 +0000)
servers/slapd/back-bdb/dn2id.c

index 2d362830ae58a963fda955bb60a3073bcc20a7dd..526ba3949575ee4934455b90c7b272f324a374f8 100644 (file)
@@ -676,7 +676,7 @@ hdb_dn2id(
                ei->bei_rdn.bv_len = data.size - sizeof(diskNode) - nrlen;
                ptr = d->nrdn + nrlen + 1;
                ber_str2bv( ptr, ei->bei_rdn.bv_len, 1, &ei->bei_rdn );
-               if ( !ei->bei_parent->bei_dkids ) {
+               if ( ei->bei_parent != NULL && !ei->bei_parent->bei_dkids ) {
                        db_recno_t dkids;
                        /* How many children does the parent have? */
                        /* FIXME: do we need to lock the parent