File 0213-ITS-9408-fix-vrfilter-double-free.patch of Package openldap2.18498

From c453e53d7c7e0d02f1baa508d502d52b9af395d7 Mon Sep 17 00:00:00 2001
From: Howard Chu <hyc@openldap.org>
Date: Sat, 28 Nov 2020 15:54:17 +0000
Subject: [PATCH 213/222] ITS#9408 fix vrfilter double-free

---
 servers/slapd/controls.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/servers/slapd/controls.c b/servers/slapd/controls.c
index 88a607942..e871f7555 100644
--- a/servers/slapd/controls.c
+++ b/servers/slapd/controls.c
@@ -1577,7 +1577,10 @@ static int parseValuesReturnFilter (
 		} else {
 			send_ldap_result( op, rs );
 		}
-		if( op->o_vrFilter != NULL) vrFilter_free( op, op->o_vrFilter ); 
+		if( op->o_vrFilter != NULL) {
+			vrFilter_free( op, op->o_vrFilter );
+			op->o_vrFilter = NULL;
+		}
 	}
 #ifdef LDAP_DEBUG
 	else {
-- 
2.30.0
openSUSE Build Service is sponsored by