summaryrefslogtreecommitdiffstats
path: root/main/openldap/CVE-2015-1546.patch
blob: c7d81bb721565f718768a563731206377577a131 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 2f1a2dd329b91afe561cd06b872d09630d4edb6a Mon Sep 17 00:00:00 2001
From: Howard Chu <hyc@openldap.org>
Date: Wed, 4 Feb 2015 02:03:55 +0000
Subject: [PATCH] ITS#8046 fix vrFilter_free

---
 servers/slapd/filter.c |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/servers/slapd/filter.c b/servers/slapd/filter.c
index b859f73..22c81c8 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:
-- 
1.7.10.4