commit 230dcf4: [Minor] Fix order of objects destruction for http keepalive conns
Vsevolod Stakhov
vsevolod at highsecure.ru
Sun Mar 29 13:21:06 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-03-29 14:19:22 +0100
URL: https://github.com/rspamd/rspamd/commit/230dcf4abeefa4b3c13a1776a78f6ea6afdb37c2 (HEAD -> master)
[Minor] Fix order of objects destruction for http keepalive conns
---
src/libserver/http/http_context.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/libserver/http/http_context.c b/src/libserver/http/http_context.c
index 8db43841d..519e4fb04 100644
--- a/src/libserver/http/http_context.c
+++ b/src/libserver/http/http_context.c
@@ -53,8 +53,9 @@ rspamd_http_keepalive_queue_cleanup (GQueue *conns)
struct rspamd_http_keepalive_cbdata *cbd;
cbd = (struct rspamd_http_keepalive_cbdata *)cur->data;
- rspamd_http_connection_unref (cbd->conn);
+ /* unref call closes fd, so we need to remove ev watcher first! */
rspamd_ev_watcher_stop (cbd->ctx->event_loop, &cbd->ev);
+ rspamd_http_connection_unref (cbd->conn);
g_free (cbd);
cur = cur->next;
More information about the Commits
mailing list