From dc0f2ce9ba97ebb47e05b80a511da6eb29818b63 Mon Sep 17 00:00:00 2001 From: Shav Kinderlehrer Date: Tue, 23 Jul 2024 17:48:28 -0400 Subject: Merge old-molehole --- src/config.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 src/config.c (limited to 'src/config.c') diff --git a/src/config.c b/src/config.c new file mode 100755 index 0000000..19a6bfa --- /dev/null +++ b/src/config.c @@ -0,0 +1,18 @@ +#include "config.h" +#include "connect.h" +#include "response.h" + +void init_config(struct config *conf) { + conf->s.url = NULL; + conf->s.conn = NULL; + conf->s.res = NULL; +} + +void conf_cleanup(struct config *conf) { + if (conf->s.url != NULL) + free_url(conf->s.url); + if (conf->s.conn != NULL) + tls_cleanup(conf->s.conn); + if (conf->s.res != NULL) + free_response(conf->s.res); +} -- cgit v1.2.3