From: Howard Chu Date: Tue, 27 Jan 2015 20:29:34 +0000 (+0000) Subject: ITS#8035 plug memleaks in syncrepl X-Git-Tag: OPENLDAP_REL_ENG_2_5_0ALPHA~141^2~125 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b53d813413d93cb9e8b38f4b3c394932f7884a87;p=thirdparty%2Fopenldap.git ITS#8035 plug memleaks in syncrepl --- diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 0e3c34a431..9147f35f0c 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -713,6 +713,7 @@ do_syncrep1( ldap_pvt_thread_mutex_unlock( &si->si_cookieState->cs_mutex ); } + ch_free( si->si_syncCookie.octet_str.bv_val ); slap_compose_sync_cookie( NULL, &si->si_syncCookie.octet_str, si->si_syncCookie.ctxcsn, si->si_syncCookie.rid, si->si_syncCookie.sid ); @@ -2898,6 +2899,7 @@ retry_add:; /* Something's wrong, start over */ ber_bvarray_free( si->si_syncCookie.ctxcsn ); si->si_syncCookie.ctxcsn = NULL; + entry_free( entry ); ldap_pvt_thread_mutex_lock( &si->si_cookieState->cs_mutex ); ber_bvarray_free( si->si_cookieState->cs_vals ); ch_free( si->si_cookieState->cs_sids );