aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_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/lua/lua_regexp.c
parentb2b9cfa6161a98d5d4d074573f99fdac6cb24556 (diff)
downloadrspamd-a47922458216ce76eb5c591096cb8d4bd41f03c3.tar.gz
rspamd-a47922458216ce76eb5c591096cb8d4bd41f03c3.zip
[Minor] Further g_slice cleanup
Diffstat (limited to 'src/lua/lua_regexp.c')
-rw-r--r--src/lua/lua_regexp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lua/lua_regexp.c b/src/lua/lua_regexp.c
index a35ec96b5..1853e4a4d 100644
--- a/src/lua/lua_regexp.c
+++ b/src/lua/lua_regexp.c
@@ -141,7 +141,7 @@ lua_regexp_create (lua_State *L)
g_error_free (err);
}
else {
- new = g_slice_alloc0 (sizeof (struct rspamd_lua_regexp));
+ new = g_malloc0 (sizeof (struct rspamd_lua_regexp));
new->re = re;
new->re_pattern = g_strdup (string);
new->module = rspamd_lua_get_module_name (L);
@@ -176,7 +176,7 @@ lua_regexp_get_cached (lua_State *L)
re = rspamd_regexp_cache_query (NULL, string, flags_str);
if (re) {
- new = g_slice_alloc0 (sizeof (struct rspamd_lua_regexp));
+ new = g_malloc0 (sizeof (struct rspamd_lua_regexp));
new->re = rspamd_regexp_ref (re);
new->re_pattern = g_strdup (string);
new->module = rspamd_lua_get_module_name (L);
@@ -222,7 +222,7 @@ lua_regexp_create_cached (lua_State *L)
re = rspamd_regexp_cache_query (NULL, string, flags_str);
if (re) {
- new = g_slice_alloc0 (sizeof (struct rspamd_lua_regexp));
+ new = g_malloc0 (sizeof (struct rspamd_lua_regexp));
new->re = rspamd_regexp_ref (re);
new->re_pattern = g_strdup (string);
new->module = rspamd_lua_get_module_name (L);
@@ -241,7 +241,7 @@ lua_regexp_create_cached (lua_State *L)
g_error_free (err);
}
else {
- new = g_slice_alloc0 (sizeof (struct rspamd_lua_regexp));
+ new = g_malloc0 (sizeof (struct rspamd_lua_regexp));
new->re = rspamd_regexp_ref (re);
new->re_pattern = g_strdup (string);
new->module = rspamd_lua_get_module_name (L);
@@ -714,7 +714,7 @@ lua_regexp_gc (lua_State *L)
g_free (to_del->re_pattern);
g_free (to_del->module);
- g_slice_free1 (sizeof (*to_del), to_del);
+ g_free (to_del);
}
return 0;