aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lua/lua_tcp.c10
-rw-r--r--src/plugins/spf.c1
2 files changed, 5 insertions, 6 deletions
diff --git a/src/lua/lua_tcp.c b/src/lua/lua_tcp.c
index 1f7b2b05b..6e47e98a0 100644
--- a/src/lua/lua_tcp.c
+++ b/src/lua/lua_tcp.c
@@ -333,12 +333,7 @@ lua_tcp_push_error (struct lua_tcp_cbdata *cbd, gboolean is_fatal,
va_start (ap, err);
for (;;) {
- if (is_fatal) {
- hdl = g_queue_pop_head (cbd->handlers);
- }
- else {
- hdl = g_queue_peek_head (cbd->handlers);
- }
+ hdl = g_queue_peek_head (cbd->handlers);
if (hdl == NULL) {
va_end (ap_copy);
@@ -380,6 +375,9 @@ lua_tcp_push_error (struct lua_tcp_cbdata *cbd, gboolean is_fatal,
/* Stop on the first callback found */
break;
}
+ else {
+ lua_tcp_shift_handler (cbd);
+ }
}
va_end (ap);
diff --git a/src/plugins/spf.c b/src/plugins/spf.c
index 097df7329..41e952eb2 100644
--- a/src/plugins/spf.c
+++ b/src/plugins/spf.c
@@ -539,6 +539,7 @@ spf_plugin_callback (struct spf_resolved *record, struct rspamd_task *task,
}
}
+
spf_record_ref (l);
spf_check_list (l, task);
spf_record_unref (l);