From: Howard Chu Date: Thu, 8 Sep 2005 11:14:12 +0000 (+0000) Subject: Check errcode from dn2entry before using ei X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~465 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a59c109109c5cc73270a8b34375824ab3b3452b8;p=openldap Check errcode from dn2entry before using ei --- diff --git a/servers/slapd/back-bdb/modify.c b/servers/slapd/back-bdb/modify.c index d342febff2..e680de5ef2 100644 --- a/servers/slapd/back-bdb/modify.c +++ b/servers/slapd/back-bdb/modify.c @@ -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 ) ||