From 59989e26773278a4e40fb9eee6af166903e492cb Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 30 Jan 2015 18:36:18 +0000 Subject: [PATCH] Be more precise when stealing a key from a message. --- src/libutil/http.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libutil/http.c b/src/libutil/http.c index 914ee6d6a..4be5a2a66 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -905,6 +905,7 @@ rspamd_http_connection_reset (struct rspamd_http_connection *conn) if (msg != NULL) { if (msg->peer_key) { priv->peer_key = msg->peer_key; + msg->peer_key = NULL; } rspamd_http_message_free (msg); priv->msg = NULL; @@ -955,6 +956,7 @@ rspamd_http_connection_read_message (struct rspamd_http_connection *conn, if (priv->peer_key) { priv->msg->peer_key = priv->peer_key; + priv->peer_key = NULL; priv->encrypted = TRUE; } -- 2.39.5