diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-09-30 15:27:08 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-09-30 15:27:08 +0100 |
commit | 59889bfc11fc176bf82743fbeeedd258ff94f563 (patch) | |
tree | 5930075beede7152acdacd9b8d105e3ef837b52e | |
parent | f3cc2419301c00043bf8ade379792160d9a93a92 (diff) | |
download | rspamd-59889bfc11fc176bf82743fbeeedd258ff94f563.tar.gz rspamd-59889bfc11fc176bf82743fbeeedd258ff94f563.zip |
[Fix] Another memory leak plugged
-rw-r--r-- | src/libserver/protocol.c | 2 | ||||
-rw-r--r-- | src/libserver/task.c | 2 |
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) { |