From c90998e60d228b77c60bda7fe9c2e40e60b22d8f Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 15 Mar 2005 23:01:06 +0000 Subject: [PATCH] cure ITS#3602 --- servers/slapd/back-bdb/referral.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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: -- 2.39.5