From c689e1cb74dea866810592a9bcbfdc2c8ae8954b Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 16 May 2000 20:50:49 +0000 Subject: [PATCH] bv2ad expects desc pointer to be NULL if unallocated --- servers/slapd/ava.c | 2 ++ servers/slapd/filter.c | 2 ++ 2 files changed, 4 insertions(+) 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 -- 2.39.5