]> git.sur5r.net Git - openldap/commitdiff
Tweak entry parent check
authorHoward Chu <hyc@openldap.org>
Mon, 12 Nov 2007 11:14:55 +0000 (11:14 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 12 Nov 2007 11:14:55 +0000 (11:14 +0000)
servers/slapd/back-bdb/modrdn.c

index bb6dea16f3fdd2827c07a187c993ba3aa15d1c9a..ffb2a3a8911e0572b312092fcfa5d7f2e63523e0 100644 (file)
@@ -303,11 +303,11 @@ retry:    /* transaction retry */
                dnParent( &e->e_nname, &p_ndn );
        }
        np_ndn = &p_ndn;
-       if ( p_ndn.bv_len != 0 ) {
+       eip = ei->bei_parent;
+       if ( eip && eip->bei_id ) {
                /* Make sure parent entry exist and we can write its 
                 * children.
                 */
-               eip = ei->bei_parent;
                rs->sr_err = bdb_cache_find_id( op, ltid,
                        eip->bei_id, &eip, 0, locker, &plock );