]> git.sur5r.net Git - openldap/commitdiff
ITS#8046 fix vrFilter_free
authorHoward Chu <hyc@openldap.org>
Wed, 4 Feb 2015 02:03:55 +0000 (02:03 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 4 Feb 2015 02:03:55 +0000 (02:03 +0000)
servers/slapd/filter.c

index b859f734d81b858484b86d1b68512f5f5d220b99..22c81c8cfbf20f377864d847135953a502dc5b75 100644 (file)
@@ -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: