diff options
-rw-r--r-- | nick.c | 3 | ||||
-rw-r--r-- | nick.h | 1 |
2 files changed, 4 insertions, 0 deletions
@@ -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; @@ -7,6 +7,7 @@ struct nick_t { char *name; struct nick_regex_t { pcre *re; + pcre_extra *re_e; struct nick_regex_t *next; } *regexes; struct nick_t *next; |