aboutsummaryrefslogtreecommitdiffstats
path: root/smtpd/config.c
diff options
context:
space:
mode:
authorGilles Chehade <gilles@poolp.org>2012-11-19 15:30:15 +0100
committerGilles Chehade <gilles@poolp.org>2012-11-19 15:30:15 +0100
commit373bf0814cbfa0c0bfcd8b24f714ad9c1cc02aaf (patch)
tree5ba316b4b6913dfd0835b58e7e6e6689ff9fd931 /smtpd/config.c
parentremove t_entry field in struct table, no longer used (diff)
downloadOpenSMTPD-373bf0814cbfa0c0bfcd8b24f714ad9c1cc02aaf.tar.xz
OpenSMTPD-373bf0814cbfa0c0bfcd8b24f714ad9c1cc02aaf.zip
simplify tree removal
Diffstat (limited to 'smtpd/config.c')
-rw-r--r--smtpd/config.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/smtpd/config.c b/smtpd/config.c
index c8f17617..c4d695cd 100644
--- a/smtpd/config.c
+++ b/smtpd/config.c
@@ -61,7 +61,6 @@ purge_config(uint8_t what)
struct table *t;
struct rule *r;
struct ssl *s;
- void *p;
if (what & PURGE_LISTENERS) {
while ((l = TAILQ_FIRST(env->sc_listeners)) != NULL) {
@@ -72,12 +71,8 @@ purge_config(uint8_t what)
env->sc_listeners = NULL;
}
if (what & PURGE_TABLES) {
- while (tree_poproot(env->sc_tables_tree, NULL, (void **)&t)) {
- while (dict_poproot(&t->t_dict, NULL, (void **)&p))
- free(p);
- dict_xpop(env->sc_tables_dict, t->t_name);
- free(t);
- }
+ while (tree_root(env->sc_tables_tree, NULL, (void **)&t))
+ table_destroy(t);
free(env->sc_tables_dict);
free(env->sc_tables_tree);
env->sc_tables_dict = NULL;