summaryrefslogtreecommitdiffstats
path: root/src/rspamd.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-06-15 15:24:48 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-06-15 15:24:48 +0100
commitcff17e1ac557a878514e8f332afb2e7fdf4be849 (patch)
treef2638a2f87da7d41ad92f2785a8fcb6d4eb9ced8 /src/rspamd.c
parent7718fb14602c410dc16a316bb4e9cc87850c0ee4 (diff)
downloadrspamd-cff17e1ac557a878514e8f332afb2e7fdf4be849.tar.gz
rspamd-cff17e1ac557a878514e8f332afb2e7fdf4be849.zip
[Fix] Fix race-condition leak on processes reload
Diffstat (limited to 'src/rspamd.c')
-rw-r--r--src/rspamd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/rspamd.c b/src/rspamd.c
index 307aa52ad..7a2ce2daa 100644
--- a/src/rspamd.c
+++ b/src/rspamd.c
@@ -753,11 +753,17 @@ wait_for_workers (gpointer key, gpointer value, gpointer unused)
nowait ? "with no result available" :
(WTERMSIG (res) == SIGKILL ? "hardly" : "softly"));
if (w->srv_pipe[0] != -1) {
+ /* Ugly workaround */
+ if (w->tmp_data) {
+ g_free (w->tmp_data);
+ }
event_del (&w->srv_ev);
}
+
if (w->finish_actions) {
g_ptr_array_free (w->finish_actions, TRUE);
}
+
REF_RELEASE (w->cf);
g_free (w);
@@ -1059,6 +1065,10 @@ rspamd_cld_handler (gint signo, short what, gpointer arg)
}
if (cur->srv_pipe[0] != -1) {
+ /* Ugly workaround */
+ if (cur->tmp_data) {
+ g_free (cur->tmp_data);
+ }
event_del (&cur->srv_ev);
}