From: Howard Chu Date: Thu, 25 Jan 2007 07:10:34 +0000 (+0000) Subject: ITS#4805 plug remaining leak X-Git-Tag: OPENLDAP_REL_ENG_2_4_4ALPHA~8^2~145 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5a263ba88f55a829a2d775e3811ac75ef0e12c60;p=openldap ITS#4805 plug remaining leak --- diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index aaf8ef26b0..164dfee15f 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -1412,12 +1412,6 @@ syncrepl_message_to_entry( return rc; } - dnPrettyNormal( NULL, &bdn, &dn, &ndn, op->o_tmpmemctx ); - ber_dupbv( &op->o_req_dn, &dn ); - ber_dupbv( &op->o_req_ndn, &ndn ); - slap_sl_free( ndn.bv_val, op->o_tmpmemctx ); - slap_sl_free( dn.bv_val, op->o_tmpmemctx ); - if ( syncstate == LDAP_SYNC_PRESENT || syncstate == LDAP_SYNC_DELETE ) { /* NOTE: this could be done even before decoding the DN, * although encoding errors wouldn't be detected */ @@ -1430,6 +1424,12 @@ syncrepl_message_to_entry( goto done; } + dnPrettyNormal( NULL, &bdn, &dn, &ndn, op->o_tmpmemctx ); + ber_dupbv( &op->o_req_dn, &dn ); + ber_dupbv( &op->o_req_ndn, &ndn ); + slap_sl_free( ndn.bv_val, op->o_tmpmemctx ); + slap_sl_free( dn.bv_val, op->o_tmpmemctx ); + e = entry_alloc(); e->e_name = op->o_req_dn; e->e_nname = op->o_req_ndn;