summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-01-30 18:36:18 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-01-30 18:36:18 +0000
commit59989e26773278a4e40fb9eee6af166903e492cb (patch)
tree25dee9acdde20219736f136823d2cf1bf6e5fed1
parent0fdf87238f0894cdb4813c19f0806330de486b2c (diff)
downloadrspamd-59989e26773278a4e40fb9eee6af166903e492cb.tar.gz
rspamd-59989e26773278a4e40fb9eee6af166903e492cb.zip
Be more precise when stealing a key from a message.
-rw-r--r--src/libutil/http.c2
1 files changed, 2 insertions, 0 deletions
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;
}