aboutsummaryrefslogtreecommitdiffstats
path: root/src/worker.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-07-26 16:57:36 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-07-26 16:57:36 +0400
commit6eded20b2c15e524ed9a83c436a3b5f0bfbd253c (patch)
treeb5a5d7bf336a7eaf965d72554c8b51028f9eb0d1 /src/worker.c
parent8e4282bb260132232c26f3f87f48181044ea6cc3 (diff)
downloadrspamd-6eded20b2c15e524ed9a83c436a3b5f0bfbd253c.tar.gz
rspamd-6eded20b2c15e524ed9a83c436a3b5f0bfbd253c.zip
* Add max_tokens options to avoid classifying and learning with too much tokens from one message.
Fix stupid memory leakage on client's timeout.
Diffstat (limited to 'src/worker.c')
-rw-r--r--src/worker.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/worker.c b/src/worker.c
index e4dfdce3f..b919ad407 100644
--- a/src/worker.c
+++ b/src/worker.c
@@ -345,7 +345,6 @@ write_socket (void *arg)
switch (task->state) {
case WRITE_REPLY:
if (!write_reply (task)) {
- destroy_session (task->s);
return FALSE;
}
if (ctx->is_custom) {
@@ -401,9 +400,7 @@ err_socket (GError * err, void *arg)
fin_custom_filters (task);
}
g_error_free (err);
- if (task->state != WRITE_REPLY) {
- destroy_session (task->s);
- }
+ destroy_session (task->s);
}
/*