mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
Free old op->o_sync_csn before allocating new one. (Internal operations
using the same op structure, such as in refint overlay, cause a memleak otherwise.) Probably should be using tmpmem for this.
This commit is contained in:
parent
71035d3aa1
commit
1d0e99858a
@ -159,6 +159,7 @@ slap_get_csn(
|
||||
pending = (struct slap_csn_entry *) ch_calloc( 1,
|
||||
sizeof( struct slap_csn_entry ));
|
||||
ldap_pvt_thread_mutex_lock( op->o_bd->be_pcl_mutexp );
|
||||
if ( op->o_sync_csn.bv_val ) free( op->o_sync_csn.bv_val );
|
||||
ber_dupbv( &op->o_sync_csn, csn );
|
||||
pending->ce_csn = ber_dupbv( NULL, csn );
|
||||
pending->ce_connid = op->o_connid;
|
||||
|
Loading…
Reference in New Issue
Block a user