]> git.sur5r.net Git - openldap/commitdiff
a fix to prev commit
authorJong Hyuk Choi <jongchoi@openldap.org>
Sat, 25 Sep 2004 03:21:30 +0000 (03:21 +0000)
committerJong Hyuk Choi <jongchoi@openldap.org>
Sat, 25 Sep 2004 03:21:30 +0000 (03:21 +0000)
servers/slapd/backend.c

index e6e7675f47f4b2cca540a665e0a4b7ff40d56198..5f336039f3137162aa146446855631144a07339f 100644 (file)
@@ -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 );
                        }
                }