From 1f853acfc973e8c1981180ba3ed339226de16f3b Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 15 Jan 2007 01:27:02 +0000 Subject: [PATCH] Shortcut when no index info is present --- servers/slapd/back-bdb/index.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-bdb/index.c b/servers/slapd/back-bdb/index.c index d7cb0faf0c..94d181de7e 100644 --- a/servers/slapd/back-bdb/index.c +++ b/servers/slapd/back-bdb/index.c @@ -482,8 +482,8 @@ bdb_index_entry( AttrInfo *ai; /* see if attribute has components to be indexed */ ai = bdb_attr_mask( op->o_bd->be_private, ap->a_desc->ad_type->sat_ad ); - if ( ai ) cr_list = ai->ai_cr; - else cr_list = NULL; + if ( !ai ) continue; + cr_list = ai->ai_cr; if ( attr_converter && cr_list ) { syn = ap->a_desc->ad_type->sat_syntax; ap->a_comp_data = op->o_tmpalloc( sizeof( ComponentData ), op->o_tmpmemctx ); -- 2.39.5