From 086e9da19d8ceaa605b1151c93b229a2e1040e79 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 15 Apr 2009 16:44:37 +0400 Subject: [PATCH] * Fix allocating and freeing of byte array --- src/message.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/message.c b/src/message.c index 0d4844141..32d9bd673 100644 --- a/src/message.c +++ b/src/message.c @@ -259,10 +259,10 @@ convert_text_to_utf (struct worker_task *task, GByteArray *part_content, GMimeCo return part_content; } - result_array = g_malloc (sizeof (GByteArray)); + result_array = memory_pool_alloc (task->task_pool, sizeof (GByteArray)); result_array->data = res_str; result_array->len = write_bytes + 1; - memory_pool_add_destructor (task->task_pool, (pool_destruct_func)free_byte_array_callback, result_array); + memory_pool_add_destructor (task->task_pool, (pool_destruct_func)g_free, res_str); return result_array; } -- 2.39.5