From: Pierangelo Masarati Date: Tue, 15 Mar 2005 23:01:06 +0000 (+0000) Subject: cure ITS#3602 X-Git-Tag: OPENLDAP_REL_ENG_2_3_BP~63 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c90998e60d228b77c60bda7fe9c2e40e60b22d8f;p=openldap cure ITS#3602 --- diff --git a/servers/slapd/back-bdb/referral.c b/servers/slapd/back-bdb/referral.c index c52288bc26..c79aee6057 100644 --- a/servers/slapd/back-bdb/referral.c +++ b/servers/slapd/back-bdb/referral.c @@ -53,7 +53,13 @@ dn2entry_retry: /* get entry */ rc = bdb_dn2entry( op, NULL, &op->o_req_ndn, &ei, 1, locker, &lock ); - e = ei->bei_e; + /* bdb_dn2entry() may legally leave ei == NULL + * if rc != 0 and rc != DB_NOTFOUND + */ + if ( ei ) { + e = ei->bei_e; + } + switch(rc) { case DB_NOTFOUND: case 0: