From f90ff2c796cc6ce0105c4e2b0de351d274a4c3fd Mon Sep 17 00:00:00 2001
From: Howard Chu <hyc@openldap.org>
Date: Tue, 1 Nov 2011 13:40:57 -0700
Subject: [PATCH] ITS#6972 fix double-free in autogroup

---
 contrib/slapd-modules/autogroup/autogroup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/contrib/slapd-modules/autogroup/autogroup.c b/contrib/slapd-modules/autogroup/autogroup.c
index c4e2fd83b6..b1f95b7f0e 100644
--- a/contrib/slapd-modules/autogroup/autogroup.c
+++ b/contrib/slapd-modules/autogroup/autogroup.c
@@ -632,11 +632,12 @@ autogroup_add_group( Operation *op, autogroup_info_t *agi, autogroup_def_t *agd,
 				}
 
 				if ( i > 1 ) {
-					Debug( LDAP_DEBUG_ANY, "autogroup_add_group: to much attributes specified in url <%s>\n",
+					Debug( LDAP_DEBUG_ANY, "autogroup_add_group: too many attributes specified in url <%s>\n",
 						bv->bv_val, 0, 0);
 					/* FIXME: error? */
 					ldap_free_urldesc( lud );
 					ch_free( agf ); 
+					continue;
 				}
 					
 				agf->agf_anlist = str2anlist( NULL, lud->lud_attrs[0], "," );
-- 
GitLab