aboutsummaryrefslogtreecommitdiffstats
path: root/src/message.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/message.c')
-rw-r--r--src/message.c4
1 files 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;
}