]> source.dussan.org Git - rspamd.git/commitdiff
Be more precise when stealing a key from a message.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 30 Jan 2015 18:36:18 +0000 (18:36 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 30 Jan 2015 18:36:18 +0000 (18:36 +0000)
src/libutil/http.c

index 914ee6d6a2859af3d04d549b455de812df673eee..4be5a2a66271fbde9c68e661984c8074fefe8baa 100644 (file)
@@ -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;
        }