commit e5e662e42c45f0d30f5f97fb0e2ad5f3c4f8b488 from: Omar Polo date: Fri Sep 02 14:04:52 2022 UTC gotwebd: kill unused id_str in got_output_repo_tree ok stsp@ commit - 2c6b597256598f3a2f21b529eef551b51db5adb5 commit + e5e662e42c45f0d30f5f97fb0e2ad5f3c4f8b488 blob - c87fec28cbaed7e09bb1e40fe6bcd3e295ca5940 blob + 14d7cbf7261ca9171a51aa4286a2d0870ffcf937 --- gotwebd/got_operations.c +++ gotwebd/got_operations.c @@ -816,7 +816,7 @@ got_output_repo_tree(struct request *c) struct got_tree_object *tree = NULL; struct repo_dir *repo_dir = t->repo_dir; const char *name, *index_page_str, *folder; - char *id_str = NULL, *escaped_name = NULL, *path = NULL; + char *escaped_name = NULL, *path = NULL; int nentries, i, r; TAILQ_INIT(&refs); @@ -864,10 +864,6 @@ got_output_repo_tree(struct request *c) te = got_object_tree_get_entry(tree, i); - error = got_object_id_str(&id_str, got_tree_entry_get_id(te)); - if (error) - goto done; - mode = got_tree_entry_get_mode(te); if (got_object_tree_entry_is_submodule(te)) modestr = "$"; @@ -923,14 +919,11 @@ got_output_repo_tree(struct request *c) if (r == -1) goto done; } - free(id_str); - id_str = NULL; free(escaped_name); escaped_name = NULL; } done: free(escaped_name); - free(id_str); free(path); got_ref_list_free(&refs); if (commit)