From: Howard Chu Date: Sun, 19 Oct 2003 02:18:38 +0000 (+0000) Subject: ITS#2778 use real malloc for new entry, not sl_malloc X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~542 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f0c8dcc33199d59a19446c8befd5050a675debbd;p=openldap ITS#2778 use real malloc for new entry, not sl_malloc --- diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 2acbcf64ef..826f0c4bca 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -723,8 +723,14 @@ syncrepl_message_to_entry( return NULL; } - e = ( Entry * ) sl_calloc( 1, sizeof( Entry ), op->o_tmpmemctx); + e = ( Entry * ) ch_calloc( 1, sizeof( Entry ) ); dnPrettyNormal( NULL, &bdn, &e->e_name, &e->e_nname, op->o_tmpmemctx ); + ber_dupbv( &op->o_req_dn, &e->e_name ); + ber_dupbv( &op->o_req_ndn, &e->e_nname ); + sl_free( e->e_nname.bv_val, op->o_tmpmemctx ); + sl_free( e->e_name.bv_val, op->o_tmpmemctx ); + e->e_name = op->o_req_dn; + e->e_nname = op->o_req_ndn; while ( ber_remaining( ber ) ) { if ( (ber_scanf( ber, "{mW}", &tmp.sml_type, &tmp.sml_values ) ==