]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/syncrepl.c
Fix memory leaks from ITS#6310 (logged as ITS#6387)
[openldap] / servers / slapd / syncrepl.c
index 80b7c34b7f1827b173e65012894167a3e1c35984..7a4e6d41181d164ad29428aab4713889f17dd8c2 100644 (file)
@@ -857,6 +857,7 @@ do_syncrep2(
                                        slap_parse_sync_cookie( &syncCookie, NULL );
                                        if ( syncCookie.ctxcsn ) {
                                                int i, sid = slap_parse_csn_sid( syncCookie.ctxcsn );
+                                               check_syncprov( op, si );
                                                for ( i =0; i<si->si_cookieState->cs_num; i++ ) {
                                                        if ( si->si_cookieState->cs_sids[i] == sid && 
                                                                ber_bvcmp( syncCookie.ctxcsn, &si->si_cookieState->cs_vals[i] ) <= 0 ) {
@@ -3718,7 +3719,7 @@ syncinfo_free( syncinfo_t *sie, int free_all )
                if ( sie->si_logbase.bv_val ) {
                        ch_free( sie->si_logbase.bv_val );
                }
-               if ( SLAP_SYNC_SUBENTRY( sie->si_be )) {
+               if ( sie->si_be && SLAP_SYNC_SUBENTRY( sie->si_be )) {
                        ch_free( sie->si_contextdn.bv_val );
                }
                if ( sie->si_attrs ) {