commit 4662d55: [Minor] Plug some new leaks

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Jul 16 15:28:09 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-07-16 16:21:34 +0100
URL: https://github.com/rspamd/rspamd/commit/4662d55e7d0245df6b347387af43d4faf01aae39 (HEAD -> master)

[Minor] Plug some new leaks

---
 src/libmime/message.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/libmime/message.c b/src/libmime/message.c
index f99efd872..d0c572ac2 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -1122,6 +1122,8 @@ rspamd_message_dtor (struct rspamd_message *msg)
 		}
 	}
 
+	rspamd_message_headers_destroy (msg->raw_headers);
+
 	g_ptr_array_unref (msg->text_parts);
 	g_ptr_array_unref (msg->parts);
 
@@ -1147,9 +1149,6 @@ rspamd_message_new (struct rspamd_task *task)
 	msg->parts = g_ptr_array_sized_new (4);
 	msg->text_parts = g_ptr_array_sized_new (2);
 
-	msg->from_mime = g_ptr_array_sized_new (1);
-	msg->rcpt_mime = g_ptr_array_sized_new (1);
-
 	REF_INIT_RETAIN (msg, rspamd_message_dtor);
 
 	return msg;


More information about the Commits mailing list