diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-04-15 16:44:37 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-04-15 16:44:37 +0400 |
commit | 086e9da19d8ceaa605b1151c93b229a2e1040e79 (patch) | |
tree | 1c8e02e7c165047f9dcc6a2dee9e4b7f797f7568 | |
parent | 0f53bbf368af43ecc67519d5de0a483f92a2dbc8 (diff) | |
download | rspamd-086e9da19d8ceaa605b1151c93b229a2e1040e79.tar.gz rspamd-086e9da19d8ceaa605b1151c93b229a2e1040e79.zip |
* Fix allocating and freeing of byte array
-rw-r--r-- | src/message.c | 4 |
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; } |