aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/task.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-04-29 12:34:12 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-04-29 12:34:12 +0100
commitaf4041d576235b6074b2247afb15a32a396251f9 (patch)
treea7624065bcdc031c4fc9e9cbab3eda3b393a2a68 /src/libserver/task.c
parent41330a043b7881a4d1c66f835ec82878b6d1e7a3 (diff)
downloadrspamd-af4041d576235b6074b2247afb15a32a396251f9.tar.gz
rspamd-af4041d576235b6074b2247afb15a32a396251f9.zip
[Fix] More fixes to parts distance calculations
- Use hashed words instead of full words for speed - Improve levenstein distance calculations and penalise replaces - Always return number from 0 to 1 - Use g_malloc instead of alloca
Diffstat (limited to 'src/libserver/task.c')
-rw-r--r--src/libserver/task.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libserver/task.c b/src/libserver/task.c
index 395d71686..bf90dd7b3 100644
--- a/src/libserver/task.c
+++ b/src/libserver/task.c
@@ -188,6 +188,9 @@ rspamd_task_free (struct rspamd_task *task)
if (tp->normalized_words) {
g_array_free (tp->normalized_words, TRUE);
}
+ if (tp->normalized_hashes) {
+ g_array_free (tp->normalized_hashes, TRUE);
+ }
}
if (task->rcpt_envelope) {