From 0acd5d97bd19290ed50329d1a48a4564b3f104bb Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Tue, 19 Jul 2005 08:40:26 +0000 Subject: [PATCH] Check op->o_bd != NULL --- servers/slapd/backend.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 950c2f55be..8734fed4ce 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -1751,17 +1751,20 @@ int backend_operational( ap = &(*ap)->a_next; } - /* Let the overlays have a chance at this */ - be_orig = op->o_bd; - if ( SLAP_ISOVERLAY( be_orig ) ) - op->o_bd = select_backend( be_orig->be_nsuffix, 0, 0 ); - - if ( ( SLAP_OPATTRS( rs->sr_attr_flags ) || rs->sr_attrs ) && - op->o_bd && op->o_bd->be_operational != NULL ) + if ( op->o_bd != NULL ) { - rc = op->o_bd->be_operational( op, rs ); + /* Let the overlays have a chance at this */ + be_orig = op->o_bd; + if ( SLAP_ISOVERLAY( be_orig ) ) + op->o_bd = select_backend( be_orig->be_nsuffix, 0, 0 ); + + if ( ( SLAP_OPATTRS( rs->sr_attr_flags ) || rs->sr_attrs ) && + op->o_bd && op->o_bd->be_operational != NULL ) + { + rc = op->o_bd->be_operational( op, rs ); + } + op->o_bd = be_orig; } - op->o_bd = be_orig; return rc; } -- 2.39.5