diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-08-26 17:45:09 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-08-26 17:45:09 +0400 |
commit | e34968660861edbc6b180e93961310189ad3309e (patch) | |
tree | 785e987f95af16b0abe5697d885c45f88f3e059c /src/classifiers | |
parent | 460852a9aba9aa7a5bfc9a83d243d9a45fe14f34 (diff) | |
download | rspamd-e34968660861edbc6b180e93961310189ad3309e.tar.gz rspamd-e34968660861edbc6b180e93961310189ad3309e.zip |
* Fix races in fuzzy storage
Diffstat (limited to 'src/classifiers')
-rw-r--r-- | src/classifiers/winnow.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/classifiers/winnow.c b/src/classifiers/winnow.c index c0c1bd755..f1f991486 100644 --- a/src/classifiers/winnow.c +++ b/src/classifiers/winnow.c @@ -382,7 +382,9 @@ winnow_learn (struct classifier_ctx *ctx, statfile_pool_t *pool, const char *sym nodes = g_tree_nnodes (input) / FEATURE_WINDOW_SIZE; if (nodes < minnodes) { msg_info ("do not learn message as it has too few tokens: %d, while %d min", nodes, minnodes); - *sum = 0; + if (sum != NULL) { + *sum = 0; + } g_set_error (err, winnow_error_quark(), /* error domain */ 1, /* error code */ |