mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
improve previous commit; same fix required by objectClasses (ITS#4185)
This commit is contained in:
parent
4d3fe81780
commit
5d83746abf
@ -394,27 +394,27 @@ at_insert(
|
||||
|
||||
ldap_memfree(air);
|
||||
|
||||
if ( rc ) {
|
||||
while ( names > sat->sat_names ) {
|
||||
struct aindexrec tmpair;
|
||||
|
||||
while ( names > sat->sat_names ) {
|
||||
names--;
|
||||
ber_str2bv( *names, 0, 0, &tmpair.air_name );
|
||||
tmpair.air_at = sat;
|
||||
air = avl_delete( &attr_index,
|
||||
(caddr_t)&tmpair, attr_index_cmp );
|
||||
assert( air != NULL );
|
||||
ldap_memfree( air );
|
||||
}
|
||||
names--;
|
||||
ber_str2bv( *names, 0, 0, &tmpair.air_name );
|
||||
tmpair.air_at = sat;
|
||||
air = (struct aindexrec *)avl_delete( &attr_index,
|
||||
(caddr_t)&tmpair, attr_index_cmp );
|
||||
assert( air != NULL );
|
||||
ldap_memfree( air );
|
||||
}
|
||||
|
||||
if ( sat->sat_oid ) {
|
||||
ber_str2bv( sat->sat_oid, 0, 0, &tmpair.air_name );
|
||||
tmpair.air_at = sat;
|
||||
air = avl_delete( &attr_index,
|
||||
(caddr_t)&tmpair, attr_index_cmp );
|
||||
assert( air != NULL );
|
||||
ldap_memfree( air );
|
||||
}
|
||||
if ( sat->sat_oid ) {
|
||||
struct aindexrec tmpair;
|
||||
|
||||
ber_str2bv( sat->sat_oid, 0, 0, &tmpair.air_name );
|
||||
tmpair.air_at = sat;
|
||||
air = (struct aindexrec *)avl_delete( &attr_index,
|
||||
(caddr_t)&tmpair, attr_index_cmp );
|
||||
assert( air != NULL );
|
||||
ldap_memfree( air );
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
@ -524,6 +524,30 @@ oc_insert(
|
||||
rc = oc_check_dup( old_soc, soc );
|
||||
|
||||
ldap_memfree( oir );
|
||||
|
||||
while ( names > soc->soc_names ) {
|
||||
struct oindexrec tmpoir;
|
||||
|
||||
names--;
|
||||
ber_str2bv( *names, 0, 0, &tmpoir.oir_name );
|
||||
tmpoir.oir_oc = soc;
|
||||
oir = (struct oindexrec *)avl_delete( &oc_index,
|
||||
(caddr_t)&tmpoir, oc_index_cmp );
|
||||
assert( oir != NULL );
|
||||
ldap_memfree( oir );
|
||||
}
|
||||
|
||||
if ( soc->soc_oid ) {
|
||||
struct oindexrec tmpoir;
|
||||
|
||||
ber_str2bv( soc->soc_oid, 0, 0, &tmpoir.oir_name );
|
||||
tmpoir.oir_oc = soc;
|
||||
oir = (struct oindexrec *)avl_delete( &oc_index,
|
||||
(caddr_t)&tmpoir, oc_index_cmp );
|
||||
assert( oir != NULL );
|
||||
ldap_memfree( oir );
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user