mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-29 02:59:34 -05:00
plug leak/logical error (ITS#6326)
This commit is contained in:
parent
8bdf89ac6a
commit
5118f06b13
1 changed files with 3 additions and 1 deletions
|
|
@ -759,6 +759,7 @@ ldap_build_entry(
|
|||
( oc = oc_bvfind_undef( &attr->a_vals[i] ) ) != NULL )
|
||||
{
|
||||
ber_dupbv( &pval, &oc->soc_cname );
|
||||
rc = LDAP_SUCCESS;
|
||||
|
||||
} else {
|
||||
LBER_FREE( attr->a_vals[i].bv_val );
|
||||
|
|
@ -770,8 +771,9 @@ ldap_build_entry(
|
|||
BER_BVZERO( &attr->a_vals[last] );
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
} else if ( pretty ) {
|
||||
if ( rc == LDAP_SUCCESS && pretty ) {
|
||||
LBER_FREE( attr->a_vals[i].bv_val );
|
||||
attr->a_vals[i] = pval;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue