From: Kurt Zeilenga Date: Wed, 28 Jul 1999 23:21:53 +0000 (+0000) Subject: Slightly improvement over last commit (ITS#238 fix). X-Git-Tag: OPENLDAP_REL_ENG_1_2_5~2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=33c5d487a59c5990c65c553dc3e791134f7f8e8f;p=openldap Slightly improvement over last commit (ITS#238 fix). --- diff --git a/servers/slapd/back-ldbm/index.c b/servers/slapd/back-ldbm/index.c index 5560f39e68..3fb8a9afa6 100644 --- a/servers/slapd/back-ldbm/index.c +++ b/servers/slapd/back-ldbm/index.c @@ -260,6 +260,13 @@ index_change_values( char *at_cn; /* Attribute canonical name */ int mode; + if( vals == NULL ) { + Debug( LDAP_DEBUG_TRACE, + "=> index_change_values( \"%s\", NULL, %ld, op=%s )\n", + type, id, ((op == __INDEX_ADD_OP) ? "ADD" : "DELETE" ) ); + return 0; + } + Debug( LDAP_DEBUG_TRACE, "=> index_change_values( \"%s\", %ld, op=%s )\n", type, id, ((op == __INDEX_ADD_OP) ? "ADD" : "DELETE" ) ); @@ -302,8 +309,7 @@ index_change_values( } - if( vals != NULL ) { - for ( i = 0; vals[i] != NULL; i++ ) { + for ( i = 0; vals[i] != NULL; i++ ) { /* * presence index entry */ @@ -413,7 +419,6 @@ index_change_values( if ( bigbuf != NULL ) { free( bigbuf ); } - } } ldbm_cache_close( be, db );