break;
}
+ free( ftmp );
+
if ( err != LDAP_SUCCESS ) {
- free( (char *) f );
if ( *fstr != NULL ) {
free( *fstr );
}
+
+ if( err != SLAPD_DISCONNECT ) {
+ /* ignore error */
+ f->f_choice = SLAPD_FILTER_COMPUTED;
+ f->f_result = SLAPD_COMPARE_UNDEFINED;
+ *fstr = ch_strdup( "(badfilter)" );
+ err = LDAP_SUCCESS;
+ *filt = f;
+
+ } else {
+ free(f);
+ }
} else {
*filt = f;
}
- free( ftmp );
-
Debug( LDAP_DEBUG_FILTER, "end get_filter %d\n", err, 0, 0 );
return( err );
}
attrsonly);
/* filter - returns a "normalized" version */
- if ( (rc = get_filter( conn, op->o_ber, &filter, &fstr, &text )) != LDAP_SUCCESS ) {
+ rc = get_filter( conn, op->o_ber, &filter, &fstr, &text );
+ if( rc != LDAP_SUCCESS ) {
if( rc == SLAPD_DISCONNECT ) {
send_ldap_disconnect( conn, op,
LDAP_PROTOCOL_ERROR, text );