From d2523adde5800bbf44cafb485098835ff15d36dc Mon Sep 17 00:00:00 2001
From: Pierangelo Masarati <ando@openldap.org>
Date: Fri, 14 Sep 2007 23:59:28 +0000
Subject: [PATCH] import fix to ITS#5137

---
 CHANGES                         | 1 +
 servers/slapd/back-ldap/chain.c | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/CHANGES b/CHANGES
index d15e1c56ed..7a5d2b7493 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5,5 +5,6 @@ OpenLDAP 2.4.6 Engineering
 	Added slapd ACL sets DN ancestors operator (ITS#4860)
 	Fixed slapd ordered values add normalization issue (ITS#5136)
 	Fixed slapd-ldap SASL idassert w/o autchId
+	Fixed slapo-chain double-free (ITS#5137)
 	Fixed slapo-dynlist entry release (ITS#5135)
 	Fixed slapo-rwm modlist handling (ITS#5124)
diff --git a/servers/slapd/back-ldap/chain.c b/servers/slapd/back-ldap/chain.c
index 509a65b187..ebaee37604 100644
--- a/servers/slapd/back-ldap/chain.c
+++ b/servers/slapd/back-ldap/chain.c
@@ -726,9 +726,6 @@ cleanup:;
 		ldap_memfree( li.li_uri );
 		li.li_uri = NULL;
 
-		op->o_tmpfree( op->o_req_dn.bv_val, op->o_tmpmemctx );
-		op->o_tmpfree( op->o_req_ndn.bv_val, op->o_tmpmemctx );
-
 		if ( temporary ) {
 			lip->li_uri = NULL;
 			lip->li_bvuri = NULL;
-- 
GitLab