From: Jong Hyuk Choi Date: Sat, 25 Sep 2004 03:21:30 +0000 (+0000) Subject: a fix to prev commit X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~505 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=292c568f367782c721e7027d8624c252bf1af9b3;p=openldap a fix to prev commit --- diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index e6e7675f47..5f336039f3 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -484,10 +484,12 @@ int backend_destroy(void) } if ( bd->be_pending_csn_list ) { - LDAP_TAILQ_FOREACH( csne, bd->be_pending_csn_list, ce_csn_link ) { + csne = LDAP_TAILQ_FIRST( bd->be_pending_csn_list ); + while ( 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 ); } }