Commit e6d4c7db authored by Howard Chu's avatar Howard Chu
Browse files

Added oidm_destroy

parent 10961151
......@@ -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,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment