break;
default:
- (void) ber_skip_tag( ber, &len );
+ (void) ber_scanf( ber, "x" ); /* skip the element */
#ifdef NEW_LOGGING
LDAP_LOG(( "filter", LDAP_LEVEL_ERR,
"get_filter: conn %d unknown filter type=%lu\n",
#else
Debug( LDAP_DEBUG_FILTER, " INITIAL\n", 0, 0, 0 );
#endif
- if ( f->f_sub_initial != NULL ) {
+
+ if ( f->f_sub_initial != NULL
+ || f->f_sub_any != NULL
+ || f->f_sub_final != NULL )
+ {
ber_bvfree( value );
goto return_error;
}
#else
Debug( LDAP_DEBUG_FILTER, " ANY\n", 0, 0, 0 );
#endif
+
+ if ( f->f_sub_final != NULL ) {
+ ber_bvfree( value );
+ goto return_error;
+ }
+
if( ber_bvecadd( &f->f_sub_any, value ) < 0 ) {
ber_bvfree( value );
goto return_error;
#else
Debug( LDAP_DEBUG_FILTER, " FINAL\n", 0, 0, 0 );
#endif
+
if ( f->f_sub_final != NULL ) {
ber_bvfree( value );
goto return_error;
}
+
f->f_sub_final = value;
if( fstr ) {
if ( f->f_sub_final != NULL ) {
ber_bvfree( f->f_sub_final );
}
+ ch_free( f->f_sub );
break;
case LDAP_FILTER_AND: