]> git.sur5r.net Git - openldap/commitdiff
resource release (more is needed: a report is coming...)
authorPierangelo Masarati <ando@openldap.org>
Fri, 6 Jan 2006 16:34:20 +0000 (16:34 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 6 Jan 2006 16:34:20 +0000 (16:34 +0000)
servers/slapd/overlays/syncprov.c

index 526d3169f2269a7323a17a5215427e9f3e0e1946..a6deda4a991a8ac3fafdd0f5c725cf52a4078733 100644 (file)
@@ -1273,7 +1273,7 @@ syncprov_add_slog( Operation *op, struct berval *csn )
                se->se_next = NULL;
                se->se_tag = op->o_tag;
 
-               se->se_uuid.bv_val = (char *)(se+1);
+               se->se_uuid.bv_val = (char *)(&se[1]);
                AC_MEMCPY( se->se_uuid.bv_val, opc->suuid.bv_val, opc->suuid.bv_len );
                se->se_uuid.bv_len = opc->suuid.bv_len;
 
@@ -2425,6 +2425,14 @@ syncprov_db_destroy(
 
        if ( si ) {
                if ( si->si_logs ) {
+                       slog_entry *se = si->si_logs->sl_head;
+
+                       while ( se ) {
+                               slog_entry *se_next = se->se_next;
+                               ch_free( se );
+                               se = se_next;
+                       }
+                               
                        ch_free( si->si_logs );
                }
                ldap_pvt_thread_mutex_destroy( &si->si_mods_mutex );