aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-09-30 15:27:08 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-09-30 15:27:08 +0100
commit59889bfc11fc176bf82743fbeeedd258ff94f563 (patch)
tree5930075beede7152acdacd9b8d105e3ef837b52e
parentf3cc2419301c00043bf8ade379792160d9a93a92 (diff)
downloadrspamd-59889bfc11fc176bf82743fbeeedd258ff94f563.tar.gz
rspamd-59889bfc11fc176bf82743fbeeedd258ff94f563.zip
[Fix] Another memory leak plugged
-rw-r--r--src/libserver/protocol.c2
-rw-r--r--src/libserver/task.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c
index 3ec4c7eca..95490ea4c 100644
--- a/src/libserver/protocol.c
+++ b/src/libserver/protocol.c
@@ -363,7 +363,7 @@ rspamd_protocol_handle_headers (struct rspamd_task *task,
if (addr) {
if (task->rcpt_envelope == NULL) {
- task->rcpt_envelope = g_ptr_array_new ();
+ task->rcpt_envelope = g_ptr_array_sized_new (2);
}
g_ptr_array_add (task->rcpt_envelope, addr);
diff --git a/src/libserver/task.c b/src/libserver/task.c
index e6cede086..6b92593de 100644
--- a/src/libserver/task.c
+++ b/src/libserver/task.c
@@ -225,6 +225,8 @@ rspamd_task_free (struct rspamd_task *task)
addr = g_ptr_array_index (task->rcpt_envelope, i);
rspamd_email_address_unref (addr);
}
+
+ g_ptr_array_free (task->rcpt_envelope, TRUE);
}
if (task->from_envelope) {