From 5a263ba88f55a829a2d775e3811ac75ef0e12c60 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 25 Jan 2007 07:10:34 +0000 Subject: [PATCH] ITS#4805 plug remaining leak --- servers/slapd/syncrepl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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; -- 2.39.5