aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/monitored.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-10-28 12:28:38 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-10-28 12:28:38 +0100
commit4656f5525d110e3951672ad66a29cfb395f7d32f (patch)
tree4d53af775cc1b00e6d1fc67dbc25ce7e7c2bde79 /src/libserver/monitored.c
parentaed03ec17f71d9bf9fcb43c0463b834331623101 (diff)
downloadrspamd-4656f5525d110e3951672ad66a29cfb395f7d32f.tar.gz
rspamd-4656f5525d110e3951672ad66a29cfb395f7d32f.zip
[Minor] More g_slice cleanups
Diffstat (limited to 'src/libserver/monitored.c')
-rw-r--r--src/libserver/monitored.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libserver/monitored.c b/src/libserver/monitored.c
index cc11183b2..96e161e1a 100644
--- a/src/libserver/monitored.c
+++ b/src/libserver/monitored.c
@@ -385,7 +385,7 @@ rspamd_monitored_ctx_init (void)
{
struct rspamd_monitored_ctx *ctx;
- ctx = g_slice_alloc0 (sizeof (*ctx));
+ ctx = g_malloc0 (sizeof (*ctx));
ctx->monitoring_interval = default_monitoring_interval;
ctx->max_errors = default_max_errors;
ctx->elts = g_ptr_array_new ();
@@ -450,7 +450,7 @@ rspamd_monitored_create_ (struct rspamd_monitored_ctx *ctx,
g_assert (ctx != NULL);
g_assert (line != NULL);
- m = g_slice_alloc0 (sizeof (*m));
+ m = g_malloc0 (sizeof (*m));
m->type = type;
m->flags = flags;
m->url = g_strdup (line);
@@ -466,7 +466,7 @@ rspamd_monitored_create_ (struct rspamd_monitored_ctx *ctx,
m->proc.monitored_dtor = rspamd_monitored_dns_dtor;
}
else {
- g_slice_free1 (sizeof (*m), m);
+ g_free (m);
return NULL;
}
@@ -474,7 +474,7 @@ rspamd_monitored_create_ (struct rspamd_monitored_ctx *ctx,
m->proc.ud = m->proc.monitored_config (m, ctx, opts);
if (m->proc.ud == NULL) {
- g_slice_free1 (sizeof (*m), m);
+ g_free (m);
return NULL;
}
@@ -603,11 +603,11 @@ rspamd_monitored_ctx_destroy (struct rspamd_monitored_ctx *ctx)
rspamd_monitored_stop (m);
g_free (m->url);
m->proc.monitored_dtor (m, m->ctx, m->proc.ud);
- g_slice_free1 (sizeof (*m), m);
+ g_free (m);
}
g_ptr_array_free (ctx->elts, TRUE);
- g_slice_free1 (sizeof (*ctx), ctx);
+ g_free (ctx);
}
struct rspamd_monitored *