diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-19 21:31:52 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-19 21:31:52 +0100 |
commit | fddf1b38c30380cbd34b4b2ca111a37cac9a1580 (patch) | |
tree | eb16c0a838ec218406da63619e9bdbd00eb8cdcc /src | |
parent | 2e3f54d8cd3ec249a11d019dbb475bf718f4f0d3 (diff) | |
download | rspamd-fddf1b38c30380cbd34b4b2ca111a37cac9a1580.tar.gz rspamd-fddf1b38c30380cbd34b4b2ca111a37cac9a1580.zip |
Fix a stupid bug in rrd event initialization.
Diffstat (limited to 'src')
-rw-r--r-- | src/controller.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/controller.c b/src/controller.c index b521eaa0e..646af0deb 100644 --- a/src/controller.c +++ b/src/controller.c @@ -1936,6 +1936,7 @@ rspamd_controller_rrd_update (gint fd, short what, void *arg) } /* Plan new event */ + event_del (ctx->rrd_event); evtimer_add (ctx->rrd_event, &rrd_update_time); } @@ -2257,7 +2258,7 @@ start_controller_worker (struct rspamd_worker *worker) ctx->rrd = rspamd_rrd_file_default (ctx->cfg->rrd_file, NULL); if (ctx->rrd) { - ctx->rrd_event = g_slice_alloc (sizeof (*ctx->rrd)); + ctx->rrd_event = g_slice_alloc0 (sizeof (*ctx->rrd_event)); evtimer_set (ctx->rrd_event, rspamd_controller_rrd_update, ctx); event_base_set (ctx->ev_base, ctx->rrd_event); event_add (ctx->rrd_event, &rrd_update_time); |