X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/a8b9ef8c1c68fbb9c89db2d8c12dca38c15e2bfd..c1cd290d1f83d3d1c2d081d734e8d213f12cc06b:/ui-stats.c diff --git a/ui-stats.c b/ui-stats.c index a9c13fd..7acd358 100644 --- a/ui-stats.c +++ b/ui-stats.c @@ -184,9 +184,9 @@ static void add_commit(struct string_list *authors, struct commit *commit, period->trunc(date); tmp = xstrdup(period->pretty(date)); item = string_list_insert(items, tmp); - if (item->util) - free(tmp); counter = (uintptr_t *)&item->util; + if (*counter) + free(tmp); (*counter)++; authorstat->total++; @@ -389,7 +389,7 @@ void cgit_show_stats(void) cgit_print_layout_start(); html("