]> git.sur5r.net Git - openldap/commitdiff
More for ITS#5326 - don't free ora_e->e_name if same as o_req_dn
authorHoward Chu <hyc@openldap.org>
Tue, 5 May 2009 21:54:01 +0000 (21:54 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 5 May 2009 21:54:01 +0000 (21:54 +0000)
servers/slapd/back-bdb/add.c

index e18feb33eb3745b2361799e5cba70e6e53e9f982..b44f86fe6415a42da3b92bf0d1bbbbb54390904e 100644 (file)
@@ -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