From: Kurt Zeilenga Date: Tue, 16 May 2000 21:44:54 +0000 (+0000) Subject: Fix desc not NULL bugs X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2940 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=349bec7c0e67d7e1f9099ca2dd13a28f70c8d741;p=openldap Fix desc not NULL bugs --- diff --git a/servers/slapd/compare.c b/servers/slapd/compare.c index d379cbf3b6..86a7d9bdc9 100644 --- a/servers/slapd/compare.c +++ b/servers/slapd/compare.c @@ -98,6 +98,7 @@ do_compare( } #ifdef SLAPD_SCHEMA_NOT_COMPAT + ava.aa_desc = NULL; rc = slap_bv2ad( &desc, &ava.aa_desc, &text ); if( rc != LDAP_SUCCESS ) { send_ldap_result( conn, op, rc, NULL, diff --git a/servers/slapd/filter.c b/servers/slapd/filter.c index 33d7d996f4..5843543165 100644 --- a/servers/slapd/filter.c +++ b/servers/slapd/filter.c @@ -372,6 +372,7 @@ get_substring_filter( } #ifdef SLAPD_SCHEMA_NOT_COMPAT + f->f_sub_desc = NULL; rc = slap_bv2ad( &type, &f->f_sub_desc, text ); ch_free( type.bv_val ); diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c index f04e4ebbca..64c88b0b22 100644 --- a/servers/slapd/schema_init.c +++ b/servers/slapd/schema_init.c @@ -688,10 +688,14 @@ schema_prep( void ) #ifdef SLAPD_SCHEMA_NOT_COMPAT for( i=0; ad_map[i].ssm_type; i++ ) { - int rc = slap_str2ad( ad_map[i].ssm_type, - (AttributeDescription **) - &(((char *) &slap_schema)[ad_map[i].ssm_offset]), - &text); + int rc; + + AttributeDescription ** adp = (AttributeDescription **) + &(((char *) &slap_schema)[ad_map[i].ssm_offset]); + + *adp = NULL; + + rc = slap_str2ad( ad_map[i].ssm_type, adp, &text ); if( rc != LDAP_SUCCESS ) { fprintf( stderr,