mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
use helper to destroy modrdn modifications...
This commit is contained in:
parent
662cb94e06
commit
f29447d9de
@ -796,22 +796,13 @@ done:
|
|||||||
if ( new_rdn != NULL ) {
|
if ( new_rdn != NULL ) {
|
||||||
ldap_rdnfree_x( new_rdn, op->o_tmpmemctx );
|
ldap_rdnfree_x( new_rdn, op->o_tmpmemctx );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( old_rdn != NULL ) {
|
if ( old_rdn != NULL ) {
|
||||||
ldap_rdnfree_x( old_rdn, op->o_tmpmemctx );
|
ldap_rdnfree_x( old_rdn, op->o_tmpmemctx );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( mod != NULL ) {
|
if( mod != NULL ) {
|
||||||
Modifications *tmp;
|
slap_modrdn2mods_free( mod );
|
||||||
for (; mod; mod=tmp ) {
|
|
||||||
tmp = mod->sml_next;
|
|
||||||
/* slap_modrdn2mods does things one way,
|
|
||||||
* slap_mods_opattrs does it differently
|
|
||||||
*/
|
|
||||||
if ( mod->sml_op != SLAP_MOD_SOFTADD &&
|
|
||||||
mod->sml_op != LDAP_MOD_DELETE ) break;
|
|
||||||
if ( mod->sml_nvalues ) free( mod->sml_nvalues[0].bv_val );
|
|
||||||
free( mod );
|
|
||||||
}
|
|
||||||
slap_mods_free( mod, 1 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* LDAP v3 Support */
|
/* LDAP v3 Support */
|
||||||
|
@ -472,18 +472,7 @@ return_results:
|
|||||||
ldap_rdnfree( old_rdn );
|
ldap_rdnfree( old_rdn );
|
||||||
}
|
}
|
||||||
if ( mod != NULL ) {
|
if ( mod != NULL ) {
|
||||||
Modifications *tmp;
|
slap_modrdn2mods_free( mod );
|
||||||
for (; mod; mod = tmp ) {
|
|
||||||
/* slap_modrdn2mods does things one way,
|
|
||||||
* slap_mods_opattrs does it differently
|
|
||||||
*/
|
|
||||||
if ( mod->sml_op != SLAP_MOD_SOFTADD &&
|
|
||||||
mod->sml_op != LDAP_MOD_DELETE ) break;
|
|
||||||
if ( mod->sml_nvalues ) free( mod->sml_nvalues[0].bv_val );
|
|
||||||
tmp = mod->sml_next;
|
|
||||||
free( mod );
|
|
||||||
}
|
|
||||||
slap_mods_free( mod, 1 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* LDAP v3 Support */
|
/* LDAP v3 Support */
|
||||||
|
Loading…
Reference in New Issue
Block a user