]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Do not free empty error
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 9 Dec 2017 20:58:09 +0000 (20:58 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 9 Dec 2017 20:58:09 +0000 (20:58 +0000)
src/fuzzy_storage.c
src/libutil/map.c

index 3b3fce36f6df81e4c31895550ca16c4f44631271..07d32fd30902bd74b9a78e32f0c18c68a06f42d3 100644 (file)
@@ -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);
                }
 
index 0965201a8ea00a5b8add7f2417942ca8f09b5e19..6061aa927aab7dfa3d1e8f3ccc738b28950711cd 100644 (file)
@@ -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);
 }