From: Ondřej Kuzník Date: Fri, 2 Sep 2022 12:00:17 +0000 (+0100) Subject: ITS#9339 Free remembered cookies on syncinfo free X-Git-Tag: OPENLDAP_REL_ENG_2_5_14~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6dd392cedc51eb372d45cff51cb4995b597df51c;p=thirdparty%2Fopenldap.git ITS#9339 Free remembered cookies on syncinfo free --- diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 52e67e48fa..74de532d56 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -5987,6 +5987,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 ) { @@ -7168,8 +7170,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; }