]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/index.c
Fix prev commit, free fakeroot on teardown
[openldap] / servers / slapd / back-bdb / index.c
index de4cf3d8363c3bb17e5d08da083252a18233ce3b..94d181de7e3dfe7a86d20d4f37228731d042a97b 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2000-2006 The OpenLDAP Foundation.
+ * Copyright 2000-2007 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -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 );