diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-04-14 15:07:00 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-04-14 15:07:00 +0100 |
commit | 00a4376019675cdbde59f1f0727580372c60f51b (patch) | |
tree | 2826853b33bb9daaace39506196ac4f426575c3b /src/libutil/regexp.c | |
parent | 8d84fd154d87a84eb2775f2d7ff7ca0868c30e10 (diff) | |
download | rspamd-00a4376019675cdbde59f1f0727580372c60f51b.tar.gz rspamd-00a4376019675cdbde59f1f0727580372c60f51b.zip |
Fix regexps lifetime.
Diffstat (limited to 'src/libutil/regexp.c')
-rw-r--r-- | src/libutil/regexp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libutil/regexp.c b/src/libutil/regexp.c index 4ecfa7879..120175016 100644 --- a/src/libutil/regexp.c +++ b/src/libutil/regexp.c @@ -86,6 +86,7 @@ static void rspamd_regexp_dtor (rspamd_regexp_t *re) { if (re) { + msg_info("dtor of %s", re->pattern); if (re->re) { pcre_free (re->re); #ifdef HAVE_PCRE_JIT @@ -451,6 +452,16 @@ rspamd_regexp_unref (rspamd_regexp_t *re) REF_RELEASE (re); } +rspamd_regexp_t* +rspamd_regexp_ref (rspamd_regexp_t *re) +{ + g_assert (re != NULL); + + REF_RETAIN (re); + + return re; +} + void rspamd_regexp_set_ud (rspamd_regexp_t *re, gpointer ud) { |