mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-18 19:50:54 +00:00
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.
This commit is contained in:
parent
270978492c
commit
845efb53c7
@ -73,6 +73,7 @@ int check_config_validity();
|
||||
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);
|
||||
|
||||
|
@ -8846,6 +8846,19 @@ int cfg_register_section(char *section_name,
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* free all config section entries
|
||||
*/
|
||||
void cfg_unregister_sections(void)
|
||||
{
|
||||
struct cfg_section *cs, *ics;
|
||||
|
||||
list_for_each_entry_safe(cs, ics, §ions, list) {
|
||||
LIST_DEL(&cs->list);
|
||||
free(cs);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* c-indent-level: 8
|
||||
|
Loading…
Reference in New Issue
Block a user