From: Howard Chu Date: Tue, 5 May 2009 21:54:01 +0000 (+0000) Subject: More for ITS#5326 - don't free ora_e->e_name if same as o_req_dn X-Git-Tag: ACLCHECK_0~575 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=650ced22c89c0cf7f345c69fa03379876f2d1be8;p=openldap More for ITS#5326 - don't free ora_e->e_name if same as o_req_dn --- diff --git a/servers/slapd/back-bdb/add.c b/servers/slapd/back-bdb/add.c index e18feb33eb..b44f86fe64 100644 --- a/servers/slapd/back-bdb/add.c +++ b/servers/slapd/back-bdb/add.c @@ -305,7 +305,8 @@ retry: /* transaction retry */ dnRdn( &op->ora_e->e_name, &rdn ); build_new_dn( &newdn, &p->e_name, &rdn, NULL ); - ber_memfree( op->ora_e->e_name.bv_val ); + if ( op->ora_e->e_name.bv_val != op->o_req_dn.bv_val ) + ber_memfree( op->ora_e->e_name.bv_val ); op->ora_e->e_name = newdn; /* FIXME: should check whether