]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9907 Some tools consider abandoned global data a leak
authorOndřej Kuzník <ondra@mistotebe.net>
Thu, 15 Sep 2022 08:15:55 +0000 (09:15 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 26 Sep 2022 16:30:47 +0000 (16:30 +0000)
servers/lloadd/config.c
servers/lloadd/init.c
servers/lloadd/proto-lload.h

index 377d7dac64a88db875eff77070fad8e629173bc2..530b037dc97fd7cd1d743d536c0985715bbcab27 100644 (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;
index fe1c1ae5f4a8f25c2d7df0cc6111d09b1e2ce917..d6e46ff626a496832d840db966bfb0e6015b619f 100644 (file)
@@ -116,6 +116,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 ) {
index f69111e17892e202defebacf62aa280f59981311..cfbbd9546a497da1c81ccdd27f149d06cf026dc5 100644 (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