From: Kurt Zeilenga Date: Tue, 16 May 2000 20:50:49 +0000 (+0000) Subject: bv2ad expects desc pointer to be NULL if unallocated X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2942 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c689e1cb74dea866810592a9bcbfdc2c8ae8954b;p=openldap bv2ad expects desc pointer to be NULL if unallocated --- diff --git a/servers/slapd/ava.c b/servers/slapd/ava.c index 8b42b7eb6d..5493cb2be3 100644 --- a/servers/slapd/ava.c +++ b/servers/slapd/ava.c @@ -48,6 +48,7 @@ get_ava( } aa = ch_malloc( sizeof( AttributeAssertion ) ); + aa->aa_desc = NULL; rc = slap_bv2ad( &type, &aa->aa_desc, &text ); @@ -59,6 +60,7 @@ get_ava( } aa->aa_value = value; + *ava = aa; return LDAP_SUCCESS; } diff --git a/servers/slapd/filter.c b/servers/slapd/filter.c index 9d7e7187c0..072414800c 100644 --- a/servers/slapd/filter.c +++ b/servers/slapd/filter.c @@ -99,6 +99,8 @@ get_filter( break; } + assert( f->f_ava != NULL ); + #ifdef SLAPD_SCHEMA_NOT_COMPAT *fstr = ch_malloc( sizeof("(=)") + f->f_av_desc->ad_cname->bv_len