]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/filter.c
Install *.schema only
[openldap] / servers / slapd / filter.c
index c2726057df759e7591c8364c097f095bd2b7b6a1..e9cfa1fe3b9d0077917dbb28325c10ab40c68426 100644 (file)
@@ -405,6 +405,7 @@ get_substring_filter(
        }
 
 #ifdef SLAPD_SCHEMA_NOT_COMPAT
+       f->f_sub = ch_calloc( 1, sizeof(SubstringsAssertion) );
        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,9 @@ return_error:
                        ber_bvfree( f->f_sub_initial );
                        ber_bvecfree( f->f_sub_any );
                        ber_bvfree( f->f_sub_final );
+#ifdef SLAPD_SCHEMA_NOT_COMPAT
+                       ch_free( f->f_sub );
+#endif
                        return rc;
                }
        }