MINOR: cfgparse: New function cfg_unregister_sections()

A new function introduced meant to be called during general deinit phase.
During the configuration parsing, the section entries are all allocated.
This new function free them.
diff --git a/include/common/cfgparse.h b/include/common/cfgparse.h
index 86a0035..d785327 100644
--- a/include/common/cfgparse.h
+++ b/include/common/cfgparse.h
@@ -73,6 +73,7 @@
 int str2listener(char *str, struct proxy *curproxy, struct bind_conf *bind_conf, const char *file, int line, char **err);
 int cfg_register_section(char *section_name,
                          int (*section_parser)(const char *, int, char **, int));
+void cfg_unregister_sections(void);
 int warnif_misplaced_tcp_conn(struct proxy *proxy, const char *file, int line, const char *arg);
 int warnif_misplaced_tcp_cont(struct proxy *proxy, const char *file, int line, const char *arg);
 
diff --git a/src/cfgparse.c b/src/cfgparse.c
index d732ac3..b40588f 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -8847,6 +8847,19 @@
 }
 
 /*
+ * free all config section entries
+ */
+void cfg_unregister_sections(void)
+{
+	struct cfg_section *cs, *ics;
+
+	list_for_each_entry_safe(cs, ics, &sections, list) {
+		LIST_DEL(&cs->list);
+		free(cs);
+	}
+}
+
+/*
  * Local variables:
  *  c-indent-level: 8
  *  c-basic-offset: 8