summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.c3
-rw-r--r--main.c6
-rw-r--r--regexset.c2
3 files changed, 11 insertions, 0 deletions
diff --git a/config.c b/config.c
index 437d993..fbcc935 100644
--- a/config.c
+++ b/config.c
@@ -45,3 +45,6 @@ int cfg_init() {
return 1;
}
+void cfg_free() {
+ config_destroy(&config);
+}
diff --git a/main.c b/main.c
index 93d5738..dfb69d5 100644
--- a/main.c
+++ b/main.c
@@ -12,5 +12,11 @@ int main(int argc, char **argv) {
rs_free();
return 1;
}
+
+ /* Parsing stuff goes here. */
+
+ cfg_free();
+ rs_free();
+
return 0;
}
diff --git a/regexset.c b/regexset.c
index 3eafb74..40ad077 100644
--- a/regexset.c
+++ b/regexset.c
@@ -57,4 +57,6 @@ void rs_free() {
pcre_free(regexes[i].text);
pcre_free(regexes[i].join);
}
+ free(regexes);
+ regexes = NULL;
}