]> source.dussan.org Git - rspamd.git/commitdiff
pcre_free_study is only valid when JIT is supported.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 5 Mar 2015 23:40:49 +0000 (23:40 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 5 Mar 2015 23:40:49 +0000 (23:40 +0000)
src/libutil/regexp.c

index 6c2046dd45085ac30f2ea9d0996f31b883bb2f5f..9a57ed380abc75ec74ff3f51ee23291dec342f59 100644 (file)
@@ -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