From: Vsevolod Stakhov Date: Thu, 16 Jul 2009 12:59:46 +0000 (+0400) Subject: * Fix stupid error with memory copying X-Git-Tag: 0.2.7~84 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d52c26c9d3cf915660d849c662fedd776268ec8a;p=thirdparty%2Frspamd.git * Fix stupid error with memory copying --- diff --git a/src/main.c b/src/main.c index cac3b40787..6052936edb 100644 --- a/src/main.c +++ b/src/main.c @@ -558,7 +558,7 @@ main (int argc, char **argv, char **env) item->s->avg_time); } - printf ("------------------------------------------------=----------------\n"); + printf ("-----------------------------------------------------------------\n"); } l = g_list_next (l); } @@ -645,7 +645,7 @@ main (int argc, char **argv, char **env) l = g_list_first (cfg->metrics_list); while (l) { metric = l->data; - if (!init_symbols_cache (cfg->cfg_pool, metric->cache, metric->cache_filename)) { + if (metric->cache && !init_symbols_cache (cfg->cfg_pool, metric->cache, metric->cache_filename)) { exit (EXIT_FAILURE); } l = g_list_next (l); diff --git a/src/symbols_cache.c b/src/symbols_cache.c index a3ab5edfdc..8ee23b7825 100644 --- a/src/symbols_cache.c +++ b/src/symbols_cache.c @@ -79,7 +79,7 @@ grow_cache (struct symbols_cache *cache) cache->items = new; /* Create new saved_cache_items */ - for (i = old - 1; i < cache->cur_items; i ++) { + for (i = old; i < cache->cur_items; i ++) { cache->items[i].s = g_new0 (struct saved_cache_item, 1); } }