From 077cb225b7aa8a27decb0f327a26c07c77f4c2f8 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 13:29:07 -0700 Subject: Clear the blame details with string_list_clear --- source/ui-blame.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'source/ui-blame.c') diff --git a/source/ui-blame.c b/source/ui-blame.c index 32a76fa..aa8d16c 100644 --- a/source/ui-blame.c +++ b/source/ui-blame.c @@ -34,15 +34,6 @@ struct walk_tree_context { // detail is cached here and looked up by object id. static struct string_list suspect_details = STRING_LIST_INIT_DUP; -static void free_suspect_details(void) -{ - struct string_list_item *item; - - for_each_string_list_item(item, &suspect_details) - free(item->util); - string_list_clear(&suspect_details, 0); -} - /* * The scoreboard keeps a pointer to revs, so the caller owns both and has to * keep them alive together. @@ -346,7 +337,7 @@ static void print_blame_page(const struct object_id *oid, const char *path, cleanup: cgit_print_layout_end(); - free_suspect_details(); + string_list_clear(&suspect_details, 1); free(buf); } -- cgit