From: Vsevolod Stakhov Date: Sat, 9 Dec 2017 20:58:09 +0000 (+0000) Subject: [Minor] Do not free empty error X-Git-Tag: 1.7.0~354 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=020dbe76121bc7f68093ccfd14a9f44f7871d04a;p=rspamd.git [Minor] Do not free empty error --- 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); }