aboutsummaryrefslogtreecommitdiff
path: root/gmid.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2022-01-01 17:08:39 +0000
committerOmar Polo <op@omarpolo.com>2022-01-01 17:08:39 +0000
commit7bdcc91ec70ddde092ac5d7b4f75d54915e7b221 (patch)
tree94066bd47c57b6610ae184e0e6c9b6a32cc440ad /gmid.c
parentbd5f79542cf6491ed9e30bca926286e3b9e2600c (diff)
simplify the proxying code
it doesn't make any sense to keep the proxying info per-location: proxying only one per-vhost. It can't work differently, it doesn't make sense anyway.
Diffstat (limited to 'gmid.c')
-rw-r--r--gmid.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gmid.c b/gmid.c
index b86359b..a6e0d1b 100644
--- a/gmid.c
+++ b/gmid.c
@@ -302,11 +302,6 @@ free_config(void)
free((char*)l->block_fmt);
free((char*)l->dir);
- free(l->proxy_host);
-
- tls_unload_file(l->proxy_cert, l->proxy_cert_len);
- tls_unload_file(l->proxy_key, l->proxy_key_len);
-
if (l->dirfd != -1)
close(l->dirfd);
@@ -343,6 +338,10 @@ free_config(void)
free((char*)h->cgi);
free((char*)h->entrypoint);
+ free(h->proxy.host);
+ tls_unload_file(h->proxy.cert, h->proxy.certlen);
+ tls_unload_file(h->proxy.key, h->proxy.keylen);
+
TAILQ_REMOVE(&hosts, h, vhosts);
free(h);
}