From 020dbe76121bc7f68093ccfd14a9f44f7871d04a Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 9 Dec 2017 20:58:09 +0000 Subject: [PATCH] [Minor] Do not free empty error --- src/fuzzy_storage.c | 4 +++- src/libutil/map.c | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index 3b3fce36f..07d32fd30 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -2724,7 +2724,9 @@ start_fuzzy (struct rspamd_worker *worker) if ((ctx->backend = rspamd_fuzzy_backend_create (ctx->ev_base, worker->cf->options, cfg, &err)) == NULL) { msg_err ("cannot open backend: %e", err); - g_error_free (err); + if (err) { + g_error_free (err); + } exit (EXIT_SUCCESS); } diff --git a/src/libutil/map.c b/src/libutil/map.c index 0965201a8..6061aa927 100644 --- a/src/libutil/map.c +++ b/src/libutil/map.c @@ -1113,7 +1113,6 @@ rspamd_map_schedule_periodic (struct rspamd_map *map, msg_debug_map ("schedule new periodic event %p in %.2f seconds", cbd, jittered_sec); double_to_tv (jittered_sec, &map->tv); - evtimer_add (&cbd->ev, &map->tv); } -- 2.39.5