diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-10-28 23:54:00 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-10-28 23:54:00 +0100 |
commit | a47922458216ce76eb5c591096cb8d4bd41f03c3 (patch) | |
tree | a5d5b79d030df2e012233999e614d0358f379053 /src/libutil/regexp.c | |
parent | b2b9cfa6161a98d5d4d074573f99fdac6cb24556 (diff) | |
download | rspamd-a47922458216ce76eb5c591096cb8d4bd41f03c3.tar.gz rspamd-a47922458216ce76eb5c591096cb8d4bd41f03c3.zip |
[Minor] Further g_slice cleanup
Diffstat (limited to 'src/libutil/regexp.c')
-rw-r--r-- | src/libutil/regexp.c | 6 |
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); |