MINOR: ssl: free the crtlist and the ckch during the deinit()
Add some functions to deinit the whole crtlist and ckch architecture.
It will free all crtlist, crtlist_entry, ckch_store, ckch_inst and their
associated SNI, ssl_conf and SSL_CTX.
The SSL_CTX in the default_ctx and initial_ctx still needs to be free'd
separately.
diff --git a/src/ssl_ckch.c b/src/ssl_ckch.c
index 7a92934..537c7ea 100644
--- a/src/ssl_ckch.c
+++ b/src/ssl_ckch.c
@@ -1889,6 +1889,19 @@
return cli_dynerr(appctx, err);
}
+void ckch_deinit()
+{
+ struct eb_node *node, *next;
+ struct ckch_store *store;
+
+ node = eb_first(&ckchs_tree);
+ while (node) {
+ next = eb_next(node);
+ store = ebmb_entry(node, struct ckch_store, node);
+ ckch_store_free(store);
+ node = next;
+ }
+}
/* register cli keywords */
static struct cli_kw_list cli_kws = {{ },{