ITS#9907 Some tools consider abandoned global data a leak

This commit is contained in:
Ondřej Kuzník 2022-09-15 09:15:55 +01:00
parent aa209e4647
commit 034225ff5c
3 changed files with 6 additions and 3 deletions

View file

@ -1389,8 +1389,8 @@ static struct {
{ NULL }
};
static void
restriction_free( struct restriction_entry *restriction )
void
lload_restriction_free( struct restriction_entry *restriction )
{
ch_free( restriction->oid.bv_val );
ch_free( restriction );
@ -1428,7 +1428,7 @@ config_restrict_oid( ConfigArgs *c )
} else if ( c->op == LDAP_MOD_DELETE ) {
if ( !c->line ) {
ldap_tavl_free( *root, (AVL_FREE)restriction_free );
ldap_tavl_free( *root, (AVL_FREE)lload_restriction_free );
*root = NULL;
if ( c->type == CFG_RESTRICT_EXOP ) {
lload_default_exop_action = LLOAD_OP_NOT_RESTRICTED;

View file

@ -114,6 +114,8 @@ lload_global_destroy( void )
}
lload_exop_destroy();
ldap_tavl_free( lload_control_actions, (AVL_FREE)lload_restriction_free );
ldap_tavl_free( lload_exop_actions, (AVL_FREE)lload_restriction_free );
#ifdef HAVE_TLS
if ( lload_tls_backend_ld ) {

View file

@ -81,6 +81,7 @@ LDAP_SLAPD_F (int) lload_bindconf_parse( const char *word, slap_bindconf *bc );
LDAP_SLAPD_F (int) lload_bindconf_unparse( slap_bindconf *bc, struct berval *bv );
LDAP_SLAPD_F (int) lload_bindconf_tls_set( slap_bindconf *bc, LDAP *ld );
LDAP_SLAPD_F (void) lload_bindconf_free( slap_bindconf *bc );
LDAP_SLAPD_F (void) lload_restriction_free( struct restriction_entry *entry );
#ifdef BALANCER_MODULE
LDAP_SLAPD_F (int) lload_back_init_cf( BackendInfo *bi );
#endif