]> git.sur5r.net Git - openldap/commitdiff
fix csne destroy
authorPierangelo Masarati <ando@openldap.org>
Mon, 27 Sep 2004 08:11:04 +0000 (08:11 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 27 Sep 2004 08:11:04 +0000 (08:11 +0000)
servers/slapd/backend.c

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