From: Pierangelo Masarati Date: Mon, 27 Sep 2004 08:11:04 +0000 (+0000) Subject: fix csne destroy X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~495 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c2c27c6839908099656608b23401a8dc4c47be8c;p=openldap fix csne destroy --- diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 5f336039f3..4c1d58a1be 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -486,11 +486,13 @@ int backend_destroy(void) if ( bd->be_pending_csn_list ) { csne = LDAP_TAILQ_FIRST( bd->be_pending_csn_list ); while ( csne ) { + struct slap_csn_entry *tmp_csne = csne; + LDAP_TAILQ_REMOVE( bd->be_pending_csn_list, csne, ce_csn_link ); ch_free( csne->ce_csn->bv_val ); ch_free( csne->ce_csn ); csne = LDAP_TAILQ_NEXT( csne, ce_csn_link ); - ch_free( csne ); + ch_free( tmp_csne ); } }