text_part->flags |= RSPAMD_MIME_TEXT_PART_FLAG_EMPTY;
}
- /* Handle offsets of this part */
- if (text_part->exceptions != NULL) {
- text_part->exceptions = g_list_reverse (text_part->exceptions);
- rspamd_mempool_add_destructor (task->task_pool,
- (rspamd_mempool_destruct_t) g_list_free, text_part->exceptions);
- }
-
rspamd_mempool_add_destructor (task->task_pool,
(rspamd_mempool_destruct_t) free_byte_array_callback,
text_part->content);
rspamd_url_text_extract (task->task_pool, task, text_part, FALSE);
}
- text_part->exceptions = g_list_sort (text_part->exceptions,
- exceptions_compare_func);
+ if (text_part->exceptions) {
+ text_part->exceptions = g_list_sort (text_part->exceptions,
+ exceptions_compare_func);
+ rspamd_mempool_add_destructor (task->task_pool,
+ (rspamd_mempool_destruct_t)g_list_free,
+ text_part->exceptions);
+ }
rspamd_extract_words (task, text_part);
}
rspamd_url_find_multiple (task->task_pool, part->stripped_content->data,
part->stripped_content->len, is_html, part->newlines,
rspamd_url_text_part_callback, &mcbd);
-
- /* Handle offsets of this part */
- if (part->exceptions != NULL) {
- part->exceptions = g_list_reverse (part->exceptions);
- rspamd_mempool_add_destructor (task->task_pool,
- (rspamd_mempool_destruct_t) g_list_free, part->exceptions);
- }
}
void