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/rrd.c | |
parent | b2b9cfa6161a98d5d4d074573f99fdac6cb24556 (diff) | |
download | rspamd-a47922458216ce76eb5c591096cb8d4bd41f03c3.tar.gz rspamd-a47922458216ce76eb5c591096cb8d4bd41f03c3.zip |
[Minor] Further g_slice cleanup
Diffstat (limited to 'src/libutil/rrd.c')
-rw-r--r-- | src/libutil/rrd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libutil/rrd.c b/src/libutil/rrd.c index 026d0673f..3e67bb2a3 100644 --- a/src/libutil/rrd.c +++ b/src/libutil/rrd.c @@ -406,7 +406,7 @@ rspamd_rrd_open_common (const gchar *filename, gboolean completed, GError **err) return NULL; } - file = g_slice_alloc0 (sizeof (struct rspamd_rrd_file)); + file = g_malloc0 (sizeof (struct rspamd_rrd_file)); if (file == NULL) { g_set_error (err, rrd_error_quark (), ENOMEM, "not enough memory"); @@ -438,7 +438,7 @@ rspamd_rrd_open_common (const gchar *filename, gboolean completed, GError **err) close (fd); g_set_error (err, rrd_error_quark (), ENOMEM, "mmap failed: %s", strerror (errno)); - g_slice_free1 (sizeof (struct rspamd_rrd_file), file); + g_free (file); return NULL; } @@ -754,7 +754,7 @@ rspamd_rrd_finalize (struct rspamd_rrd_file *file, GError **err) close (fd); g_set_error (err, rrd_error_quark (), ENOMEM, "mmap failed: %s", strerror (errno)); - g_slice_free1 (sizeof (struct rspamd_rrd_file), file); + g_free (file); return FALSE; } @@ -1265,7 +1265,7 @@ rspamd_rrd_close (struct rspamd_rrd_file * file) g_free (file->filename); g_free (file->id); - g_slice_free1 (sizeof (struct rspamd_rrd_file), file); + g_free (file); return 0; } @@ -1489,7 +1489,7 @@ rspamd_rrd_query (struct rspamd_rrd_file *file, return NULL; } - res = g_slice_alloc0 (sizeof (*res)); + res = g_malloc0 (sizeof (*res)); res->ds_count = file->stat_head->ds_cnt; res->last_update = (gdouble)file->live_head->last_up + ((gdouble)file->live_head->last_up_usec / 1e6f); |