From a59c109109c5cc73270a8b34375824ab3b3452b8 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 8 Sep 2005 11:14:12 +0000 Subject: [PATCH] Check errcode from dn2entry before using ei --- servers/slapd/back-bdb/modify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ) || -- 2.39.5