diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-03-05 23:40:49 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-03-05 23:40:49 +0000 |
commit | 50cb1d594e2cd6430d5a632ac424b6c9383c77c9 (patch) | |
tree | a71c722fc1cedcd3aed4050773753024141d9f0e /src/libutil/regexp.c | |
parent | cf166128481bcdfaec8b6845acf3332494253839 (diff) | |
download | rspamd-50cb1d594e2cd6430d5a632ac424b6c9383c77c9.tar.gz rspamd-50cb1d594e2cd6430d5a632ac424b6c9383c77c9.zip |
pcre_free_study is only valid when JIT is supported.
Diffstat (limited to 'src/libutil/regexp.c')
-rw-r--r-- | src/libutil/regexp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libutil/regexp.c b/src/libutil/regexp.c index 6c2046dd4..9a57ed380 100644 --- a/src/libutil/regexp.c +++ b/src/libutil/regexp.c @@ -86,17 +86,21 @@ rspamd_regexp_dtor (rspamd_regexp_t *re) { if (re) { if (re->re) { - pcre_free_study (re->extra); pcre_free (re->re); #ifdef HAVE_PCRE_JIT + pcre_free_study (re->extra); pcre_jit_stack_free (re->jstack); +#else + pcre_free (re->extra); #endif } if (re->raw_re) { - pcre_free_study (re->raw_extra); pcre_free (re->raw_re); #ifdef HAVE_PCRE_JIT + pcre_free_study (re->raw_extra); pcre_jit_stack_free (re->raw_jstack); +#else + pcre_free (re->raw_extra); #endif } #ifdef HAVE_PCRE_JIT |