From: Howard Chu Date: Wed, 4 Feb 2015 02:03:55 +0000 (+0000) Subject: ITS#8046 fix vrFilter_free X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2f1a2dd329b91afe561cd06b872d09630d4edb6a;p=openldap ITS#8046 fix vrFilter_free --- diff --git a/servers/slapd/filter.c b/servers/slapd/filter.c index b859f734d8..22c81c8cfb 100644 --- a/servers/slapd/filter.c +++ b/servers/slapd/filter.c @@ -1158,14 +1158,10 @@ get_vrFilter( Operation *op, BerElement *ber, void vrFilter_free( Operation *op, ValuesReturnFilter *vrf ) { - ValuesReturnFilter *p, *next; + ValuesReturnFilter *next; - if ( vrf == NULL ) { - return; - } - - for ( p = vrf; p != NULL; p = next ) { - next = p->vrf_next; + for ( ; vrf != NULL; vrf = next ) { + next = vrf->vrf_next; switch ( vrf->vrf_choice & SLAPD_FILTER_MASK ) { case LDAP_FILTER_PRESENT: