mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 00:59:45 -05:00
Fix crasher in attr_merge_normalize_one()
This commit is contained in:
parent
331e627541
commit
03fcb6526d
1 changed files with 8 additions and 2 deletions
|
|
@ -230,6 +230,7 @@ attr_merge_normalize_one(
|
|||
void *memctx
|
||||
) {
|
||||
struct berval nval;
|
||||
struct berval *nvalp;
|
||||
int rc;
|
||||
|
||||
if ( desc->ad_type->sat_equality->smr_normalize ) {
|
||||
|
|
@ -242,10 +243,15 @@ attr_merge_normalize_one(
|
|||
if ( rc != LDAP_SUCCESS ) {
|
||||
return rc;
|
||||
}
|
||||
nvalp = &nval;
|
||||
} else {
|
||||
nvalp = NULL;
|
||||
}
|
||||
|
||||
rc = attr_merge_one( e, desc, val, &nval );
|
||||
ch_free( nval.bv_val );
|
||||
rc = attr_merge_one( e, desc, val, nvalp );
|
||||
if ( nvalp != NULL ) {
|
||||
ch_free( nval.bv_val );
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue