diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2009-08-13 02:55:54 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2009-08-13 02:55:54 +0200 |
commit | d436d19acb8a313f159aa67769dd49f7a369eb17 (patch) | |
tree | 5a0141373a1223f7959442542c8054561e98569b | |
parent | 93c935a639da55c1bc4d39e616588cc0f73df1e3 (diff) |
Init and free channels. Currently crashes when freeing existing config or channels.
-rw-r--r-- | main.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; |