]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9339 Free remembered cookies on syncinfo free
authorOndřej Kuzník <ondra@mistotebe.net>
Fri, 2 Sep 2022 12:00:17 +0000 (13:00 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 12 Sep 2022 20:46:01 +0000 (20:46 +0000)
servers/slapd/syncrepl.c

index 40d7729543f765e6cf72fed9c684199c0e0df515..b26cb325168d3d15d156d8ef3d3b3b827a32d073 100644 (file)
@@ -6026,6 +6026,8 @@ syncinfo_free( syncinfo_t *sie, int free_all )
                if ( !BER_BVISEMPTY( &sie->si_monitor_ndn )) {
                        syncrepl_monitor_del( sie );
                }
+               ch_free( sie->si_lastCookieSent.bv_val );
+               ch_free( sie->si_lastCookieRcvd.bv_val );
 
                if ( sie->si_ld ) {
                        if ( sie->si_conn ) {
@@ -7207,8 +7209,6 @@ syncrepl_monitor_del(
                monitor_extra_t *mbe = mi->bi_extra;
                mbe->unregister_entry( &si->si_monitor_ndn );
        }
-       ch_free( si->si_lastCookieSent.bv_val );
-       ch_free( si->si_lastCookieRcvd.bv_val );
        ch_free( si->si_monitor_ndn.bv_val );
        return 0;
 }