if (err->code != EOF) {
msg_info ("abnormally closing control connection, error: %s", err->message);
}
-
+ g_error_free (err);
/* Free buffers */
destroy_session (session->s);
}
rep->elements = g_list_prepend (rep->elements, elt);
}
}
+ if (rep->elements) {
+ memory_pool_add_destructor (req->pool, (pool_destruct_func)g_list_free, rep->elements);
+ }
return rep;
}
if (task->raw_headers) {
memory_pool_add_destructor (task->task_pool, (pool_destruct_func) g_free, task->raw_headers);
- memory_pool_add_destructor (task->task_pool, (pool_destruct_func) g_list_free, task->raw_headers_list);
process_raw_headers (task);
+ memory_pool_add_destructor (task->task_pool, (pool_destruct_func) g_list_free, task->raw_headers_list);
}
task->rcpts = g_mime_message_get_all_recipients (message);
return 0;
}
else {
+ memory_pool_add_destructor (task->task_pool, (pool_destruct_func)g_list_free, headerlist);
/* Check whether we have regexp for it */
if (re->regexp == NULL) {
debug_task ("regexp contains only header and it is found %s", re->header);
cur = headerlist;
while (cur) {
debug_task ("found header \"%s\" with value \"%s\"", re->header, (const gchar *)cur->data);
-
/* Try to match regexp */
if (cur->data && g_regex_match_full (re->regexp, cur->data, -1, 0, 0, NULL, &err) == TRUE) {
if (G_UNLIKELY (re->is_test)) {
if (task->messages) {
g_list_free (task->messages);
}
+ if (task->received) {
+ g_list_free (task->received);
+ }
memory_pool_delete (task->task_pool);
if (task->dispatcher) {
if (is_soft) {
if (ctx->is_custom) {
fin_custom_filters (task);
}
+ g_error_free (err);
if (task->state != WRITE_REPLY) {
destroy_session (task->s);
}