summaryrefslogtreecommitdiff
path: root/nick.c
diff options
context:
space:
mode:
Diffstat (limited to 'nick.c')
-rw-r--r--nick.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/nick.c b/nick.c
index 486f4fb..8b336de 100644
--- a/nick.c
+++ b/nick.c
@@ -53,6 +53,7 @@ int nick_regex_add(struct nick_t *nick, const char *re_s) {
free(nre);
return 0;
}
+ nre->re_e = pcre_study(nre->re, 0, &error);
nre->next = NULL;
@@ -73,6 +74,8 @@ void nick_free() {
struct nick_regex_t *re = nick->regexes;
while(re) {
pcre_free(re->re);
+ if(re->re_e)
+ pcre_free(re->re_e);
struct nick_regex_t *next = re->next;
free(re);
re = next;