mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Added oidm_destroy
This commit is contained in:
parent
10961151ef
commit
e6d4c7dbcc
@ -718,6 +718,7 @@ LDAP_SLAPD_F (int) syn_schema_info( Entry *e );
|
||||
*/
|
||||
|
||||
LDAP_SLAPD_F (void) oc_destroy LDAP_P(( void ));
|
||||
LDAP_SLAPD_F (void) oidm_destroy LDAP_P(( void ));
|
||||
LDAP_SLAPD_F (void) at_destroy LDAP_P(( void ));
|
||||
LDAP_SLAPD_F (void) ad_destroy LDAP_P(( void * ));
|
||||
LDAP_SLAPD_F (void) mr_destroy LDAP_P(( void ));
|
||||
|
@ -4647,6 +4647,7 @@ schema_init( void )
|
||||
void
|
||||
schema_destroy( void )
|
||||
{
|
||||
oidm_destroy();
|
||||
oc_destroy();
|
||||
at_destroy();
|
||||
mr_destroy();
|
||||
|
@ -116,8 +116,8 @@ find_oidm(char *oid)
|
||||
|
||||
if( pos ) {
|
||||
int suflen = strlen(oid + pos);
|
||||
char *new = ch_calloc(1,
|
||||
om->som_oid.bv_len + suflen + 1);
|
||||
char *new = ch_malloc( om->som_oid.bv_len
|
||||
+ suflen + 1);
|
||||
strcpy(new, om->som_oid.bv_val);
|
||||
|
||||
if( suflen ) {
|
||||
@ -132,6 +132,19 @@ find_oidm(char *oid)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
oidm_destroy()
|
||||
{
|
||||
OidMacro *om, *n;
|
||||
|
||||
for (om = om_list; om; om = n) {
|
||||
n = om->som_next;
|
||||
charray_free(om->som_names);
|
||||
free(om->som_oid.bv_val);
|
||||
free(om);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
parse_oidm(
|
||||
const char *fname,
|
||||
|
Loading…
Reference in New Issue
Block a user