summaryrefslogtreecommitdiffstats
path: root/src/libutil/regexp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-10-28 23:54:00 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-10-28 23:54:00 +0100
commita47922458216ce76eb5c591096cb8d4bd41f03c3 (patch)
treea5d5b79d030df2e012233999e614d0358f379053 /src/libutil/regexp.c
parentb2b9cfa6161a98d5d4d074573f99fdac6cb24556 (diff)
downloadrspamd-a47922458216ce76eb5c591096cb8d4bd41f03c3.tar.gz
rspamd-a47922458216ce76eb5c591096cb8d4bd41f03c3.zip
[Minor] Further g_slice cleanup
Diffstat (limited to 'src/libutil/regexp.c')
-rw-r--r--src/libutil/regexp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libutil/regexp.c b/src/libutil/regexp.c
index 1d04b83f9..8174a30fc 100644
--- a/src/libutil/regexp.c
+++ b/src/libutil/regexp.c
@@ -156,7 +156,7 @@ rspamd_regexp_dtor (rspamd_regexp_t *re)
g_free (re->pattern);
}
- g_slice_free1 (sizeof (*re), re);
+ g_free (re);
}
}
@@ -464,7 +464,7 @@ fin:
}
/* Now allocate the target structure */
- res = g_slice_alloc0 (sizeof (*res));
+ res = g_malloc0 (sizeof (*res));
REF_INIT_RETAIN (res, rspamd_regexp_dtor);
res->flags = rspamd_flags;
res->pattern = real_pattern;
@@ -946,7 +946,7 @@ rspamd_regexp_cache_new (void)
{
struct rspamd_regexp_cache *ncache;
- ncache = g_slice_alloc (sizeof (*ncache));
+ ncache = g_malloc0 (sizeof (*ncache));
ncache->tbl = g_hash_table_new_full (rspamd_regexp_hash, rspamd_regexp_equal,
NULL, (GDestroyNotify)rspamd_regexp_unref);