diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-02-05 12:37:39 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-02-05 12:37:39 +0100 |
commit | 1475fa5bc677ea4baa8782b5edebf0d50c92378a (patch) | |
tree | 2d3e7b57256d5647b7c295e3c598cdcf9d7b5267 /src/fuzzy_storage.c | |
parent | 6c8b19b9422f6fb4b776a59617750d53a48da5f1 (diff) | |
download | rspamd-1475fa5bc677ea4baa8782b5edebf0d50c92378a.tar.gz rspamd-1475fa5bc677ea4baa8782b5edebf0d50c92378a.zip |
[Minor] Fix double free in collection mode
Diffstat (limited to 'src/fuzzy_storage.c')
-rw-r--r-- | src/fuzzy_storage.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index b0606eb97..7b939d3f0 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -2859,10 +2859,13 @@ start_fuzzy (struct rspamd_worker *worker) rspamd_fuzzy_backend_close (ctx->backend); } else if (worker->index == 0) { - rspamd_http_router_free (ctx->collection_rt); - /* Try to save collection id */ gint fd; + /* Steal keypairs cache... */ + ctx->collection_rt->cache = NULL; + rspamd_http_router_free (ctx->collection_rt); + + /* Try to save collection id */ fd = rspamd_file_xopen (ctx->collection_id_file, O_WRONLY | O_CREAT | O_TRUNC, 00644); |