From c2c27c6839908099656608b23401a8dc4c47be8c Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 27 Sep 2004 08:11:04 +0000 Subject: [PATCH] fix csne destroy --- servers/slapd/backend.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 ); } } -- 2.39.5