diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-10-28 15:14:33 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-10-28 15:14:33 +0100 |
commit | b2b9cfa6161a98d5d4d074573f99fdac6cb24556 (patch) | |
tree | 7d531529f1798da141faeb17b0df1b47fc08896a /src/libstat/backends | |
parent | 4656f5525d110e3951672ad66a29cfb395f7d32f (diff) | |
download | rspamd-b2b9cfa6161a98d5d4d074573f99fdac6cb24556.tar.gz rspamd-b2b9cfa6161a98d5d4d074573f99fdac6cb24556.zip |
[Minor] Further portion of g_slice elimination
Diffstat (limited to 'src/libstat/backends')
-rw-r--r-- | src/libstat/backends/redis_backend.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c index 1fd0ca1f5..22c784e07 100644 --- a/src/libstat/backends/redis_backend.c +++ b/src/libstat/backends/redis_backend.c @@ -717,7 +717,7 @@ rspamd_redis_async_cbdata_cleanup (struct rspamd_redis_stat_cbdata *cbdata) ucl_object_unref (cbdata->cur); } - g_slice_free1 (sizeof (*cbdata), cbdata); + g_free (cbdata); } } @@ -913,7 +913,7 @@ rspamd_redis_async_stat_cb (struct rspamd_stat_async_elt *elt, gpointer d) /* Disable further events unless needed */ elt->enabled = FALSE; - cbdata = g_slice_alloc0 (sizeof (*cbdata)); + cbdata = g_malloc0 (sizeof (*cbdata)); cbdata->selected = rspamd_upstream_get (ctx->read_servers, RSPAMD_UPSTREAM_ROUND_ROBIN, NULL, @@ -1346,7 +1346,7 @@ rspamd_redis_init (struct rspamd_stat_ctx *ctx, const ucl_object_t *obj; gboolean ret = FALSE; - backend = g_slice_alloc0 (sizeof (*backend)); + backend = g_malloc0 (sizeof (*backend)); /* First search in backend configuration */ obj = ucl_object_lookup (st->classifier->cfg->opts, "backend"); @@ -1387,14 +1387,14 @@ rspamd_redis_init (struct rspamd_stat_ctx *ctx, if (!ret) { msg_err_config ("cannot init redis backend for %s", stf->symbol); - g_slice_free1 (sizeof (*backend), backend); + g_free (backend); return NULL; } stf->clcf->flags |= RSPAMD_FLAG_CLASSIFIER_INCREMENTING_BACKEND; backend->stcf = stf; - st_elt = g_slice_alloc0 (sizeof (*st_elt)); + st_elt = g_malloc0 (sizeof (*st_elt)); st_elt->ev_base = ctx->ev_base; st_elt->ctx = backend; backend->stat_elt = rspamd_stat_ctx_register_async ( @@ -1486,7 +1486,7 @@ rspamd_redis_close (gpointer p) rspamd_upstreams_destroy (ctx->write_servers); } - g_slice_free1 (sizeof (*ctx), ctx); + g_free (ctx); } gboolean |