summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.c b/main.c
index a6e9019..93d5738 100644
--- a/main.c
+++ b/main.c
@@ -1,9 +1,15 @@
#include <stdio.h>
#include "config.h"
+#include "regexset.h"
int main(int argc, char **argv) {
+ /* Regex sets must be initialized before config. */
+ rs_init();
if(!cfg_init()) {
+ /* Free any registered regex sets when config fails.
+ Config will fail if a regex set fails to compile all parts. */
+ rs_free();
return 1;
}
return 0;