]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Check copy result when sending message to mirrors
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 17 Jun 2016 14:03:54 +0000 (15:03 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 17 Jun 2016 14:03:54 +0000 (15:03 +0100)
src/rspamd_proxy.c

index 20044cfe54c78d822ffb26d175654f0f702df34c..99fec6cc565799700b74c1dfdb7ae92648574b14 100644 (file)
@@ -1031,6 +1031,13 @@ proxy_open_mirror_connections (struct rspamd_proxy_session *session)
                }
 
                msg = rspamd_http_connection_copy_msg (session->client_conn);
+
+               if (msg == NULL) {
+                       msg_err_session ("cannot copy message to send to a mirror %s: %s",
+                                       m->name, strerror (errno));
+                       continue;
+               }
+
                rspamd_http_message_remove_header (msg, "Content-Length");
                rspamd_http_message_remove_header (msg, "Key");
                msg->method = HTTP_GET;