From: Howard Chu Date: Sat, 6 Dec 2003 13:48:06 +0000 (+0000) Subject: Fix add invocation X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~257 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1a9064794abed27e72c3f62b918eabe6b4dc6424;p=openldap Fix add invocation --- diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index ebfd81aea2..0f6c652aa2 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -169,6 +169,8 @@ merge_entry( op->o_do_not_cache = 1; op->ora_e = e; + op->o_req_dn = e->e_name; + op->o_req_ndn = e->e_nname; rc = op->o_bd->be_add( op, &sreply ); if ( rc != LDAP_SUCCESS ) { @@ -177,8 +179,6 @@ merge_entry( modlist->sml_op = LDAP_MOD_ADD; op->o_tag = LDAP_REQ_MODIFY; op->orm_modlist = modlist; - op->o_req_dn = e->e_name; - op->o_req_ndn = e->e_nname; rc = op->o_bd->be_modify( op, &sreply ); slap_mods_free( modlist ); } else if ( rc == LDAP_REFERRAL || @@ -187,6 +187,8 @@ merge_entry( } else { rc = 0; } + } else { + be_entry_release_w( op, e ); } return rc;