From: Kurt Zeilenga Date: Sat, 27 May 2000 20:37:59 +0000 (+0000) Subject: SLAPD_SCHEMA_NOT_COMPAT: allocate/deallocate f_sub as needed. X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2837 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=58d25f4ab1a1b4a3520e23e0c126bb643835cc83;p=openldap SLAPD_SCHEMA_NOT_COMPAT: allocate/deallocate f_sub as needed. --- diff --git a/servers/slapd/filter.c b/servers/slapd/filter.c index c2726057df..d91f988dc9 100644 --- a/servers/slapd/filter.c +++ b/servers/slapd/filter.c @@ -405,6 +405,7 @@ get_substring_filter( } #ifdef SLAPD_SCHEMA_NOT_COMPAT + f->f_sub = ch_calloc( 1, sizeof(SubstringAssertion) ); f->f_sub_desc = NULL; rc = slap_bv2ad( &type, &f->f_sub_desc, text ); @@ -412,6 +413,7 @@ get_substring_filter( if( rc != LDAP_SUCCESS ) { text = NULL; + ch_free( f->f_sub ); f->f_choice = SLAPD_FILTER_COMPUTED; f->f_result = SLAPD_COMPARE_UNDEFINED; *fstr = ch_strdup( "(undefined)" ); @@ -576,6 +578,7 @@ return_error: ber_bvfree( f->f_sub_initial ); ber_bvecfree( f->f_sub_any ); ber_bvfree( f->f_sub_final ); + ch_free( f->f_sub ); return rc; } }