From d436d19acb8a313f159aa67769dd49f7a369eb17 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Thu, 13 Aug 2009 02:55:54 +0200 Subject: Init and free channels. Currently crashes when freeing existing config or channels. --- main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index dfb69d5..9f822ed 100644 --- a/main.c +++ b/main.c @@ -2,20 +2,24 @@ #include "config.h" #include "regexset.h" +#include "channel.h" int main(int argc, char **argv) { /* Regex sets must be initialized before config. */ rs_init(); + channel_init(); if(!cfg_init()) { - /* Free any registered regex sets when config fails. + /* Free any registered regex sets and channels when config fails. Config will fail if a regex set fails to compile all parts. */ rs_free(); + channel_free(); return 1; } /* Parsing stuff goes here. */ cfg_free(); + channel_free(); rs_free(); return 0; -- cgit v1.2.3