mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-07 07:30:57 -05:00
plug modrdn memleaks
This commit is contained in:
parent
1bb48a06fc
commit
a875d7df18
2 changed files with 7 additions and 0 deletions
|
|
@ -153,6 +153,7 @@ int ldbm_modify_internal(
|
|||
|
||||
rc = modify_add_values( e, mod, get_permissiveModify( op ),
|
||||
text, textbuf, textlen );
|
||||
mod->sm_op = SLAP_MOD_SOFTADD;
|
||||
if ( rc == LDAP_TYPE_OR_VALUE_EXISTS ) {
|
||||
rc = LDAP_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -655,10 +655,16 @@ return_results:
|
|||
if ( mod != NULL ) {
|
||||
Modifications *tmp;
|
||||
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 );
|
||||
}
|
||||
|
||||
/* LDAP v3 Support */
|
||||
|
|
|
|||
Loading…
Reference in a new issue