]> git.sur5r.net Git - openldap/commitdiff
Check errcode from dn2entry before using ei
authorHoward Chu <hyc@openldap.org>
Thu, 8 Sep 2005 11:14:12 +0000 (11:14 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 8 Sep 2005 11:14:12 +0000 (11:14 +0000)
servers/slapd/back-bdb/modify.c

index d342febff2787200199ec3a5b7bae75198757f7c..e680de5ef2a176f9720f394f1272a1915c4bf565 100644 (file)
@@ -345,8 +345,6 @@ retry:      /* transaction retry */
        rs->sr_err = bdb_dn2entry( op, ltid, &op->o_req_ndn, &ei, 1,
                locker, &lock );
 
-       e = ei->bei_e;
-
        if ( rs->sr_err != 0 ) {
                Debug( LDAP_DEBUG_TRACE,
                        LDAP_XSTRING(bdb_modify) ": dn2entry failed (%d)\n",
@@ -380,6 +378,8 @@ retry:      /* transaction retry */
                }
        }
 
+       e = ei->bei_e;
+
        /* acquire and lock entry */
        /* FIXME: dn2entry() should return non-glue entry */
        if (( rs->sr_err == DB_NOTFOUND ) ||