]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/at.c
ITS#4040 move initialization
[openldap] / servers / slapd / at.c
index 44ec64c2e0499b4ddfea3fa46d0c428e0bb8014e..59bdb98142a23cf8882be565ef94941c41e9198a 100644 (file)
@@ -247,6 +247,10 @@ at_destroy( void )
        if ( slap_schema.si_at_undefined ) {
                ad_destroy(slap_schema.si_at_undefined->sat_ad);
        }
+
+       if ( slap_schema.si_at_proxied ) {
+               ad_destroy(slap_schema.si_at_proxied->sat_ad);
+       }
 }
 
 int
@@ -400,6 +404,18 @@ at_insert(
                }
        }
 
+       if ( sat->sat_oid ) {
+               slap_ad_undef_promote( sat->sat_oid, sat );
+       }
+
+       names = sat->sat_names;
+       if ( names ) {
+               while ( *names ) {
+                       slap_ad_undef_promote( *names, sat );
+                       names++;
+               }
+       }
+
        LDAP_STAILQ_INSERT_TAIL( &attr_list, sat, sat_next );
 
        return 0;