From c1b07aa8b061a17d08518b0098c6518521b570bb Mon Sep 17 00:00:00 2001
From: Quanah Gibson-Mount <quanah@openldap.org>
Date: Tue, 17 Mar 2009 18:11:57 +0000
Subject: [PATCH] ITS#6027

---
 CHANGES            | 1 +
 servers/slapd/at.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGES b/CHANGES
index dd9a32ce56..88a843200b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -9,6 +9,7 @@ OpenLDAP 2.4.16 Engineering
 	Fixed libldap referral chasing (ITS#5980)
 	Fixed slapd backglue with empty DBs (ITS#5986)
 	Fixed slapd ctxcsn race condition (ITS#6001)
+	Fixed slapd debug message (ITS#6027)
 	Fixed slapd syncrepl newCookie sync messages (ITS#5972)
 	Fixed slapd syncrepl hang during shutdown (ITS#6011)
 	Fixed slapd syncrepl too many MMR messages (ITS#6020)
diff --git a/servers/slapd/at.c b/servers/slapd/at.c
index d4c4244b38..59899b4395 100644
--- a/servers/slapd/at.c
+++ b/servers/slapd/at.c
@@ -1080,10 +1080,10 @@ register_at( const char *def, AttributeDescription **rad, int dupok )
 			freeit = 1;
 
 		} else {
-			ldap_attributetype_free( at );
 			Debug( LDAP_DEBUG_ANY,
 				"register_at: AttributeType \"%s\": %s, %s\n",
 				def, scherr2str(code), err );
+			ldap_attributetype_free( at );
 			return code;
 		}
 	}
-- 
GitLab