aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2023-07-23 19:30:14 +0000
committerOmar Polo <op@omarpolo.com>2023-07-23 19:30:14 +0000
commit45c946b37bd2e22f095af6ac290fbf865eb595a1 (patch)
treeed65741f3d1ee05a984781481acbecda8b14d9ba /config.c
parent3d56cb53361a531d410d116cbc752e07d20dfa05 (diff)
avoid use-after-free
Diffstat (limited to 'config.c')
-rw-r--r--config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/config.c b/config.c
index 3b84aa4..d939839 100644
--- a/config.c
+++ b/config.c
@@ -96,12 +96,13 @@ config_purge(struct conf *conf)
free(l->reqca_path);
X509_STORE_free(l->reqca);
- free(l);
TAILQ_FOREACH_SAFE(e, &l->params, envs, te) {
TAILQ_REMOVE(&l->params, e, envs);
free(e);
}
+
+ free(l);
}
TAILQ_FOREACH_SAFE(a, &h->aliases, aliases, ta) {