X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/9c70c0bfdb71b39f6bae6e0c77bbe40b22d64ff5..1c581a072651524f3b0d91f33e22a42c4166dd96:/ui-tree.c?ds=sidebyside diff --git a/ui-tree.c b/ui-tree.c index 1b310d5..3ff2320 100644 --- a/ui-tree.c +++ b/ui-tree.c @@ -143,6 +143,7 @@ static int ls_item(const unsigned char *sha1, struct strbuf *base, htmlf("Bad object: %s %s", name, sha1_to_hex(sha1)); + free(name); return 0; } } @@ -286,7 +287,7 @@ void cgit_print_tree(const char *rev, char *path) walk_tree_ctx.curr_rev = xstrdup(rev); if (path == NULL) { - ls_tree(commit->tree->object.sha1, NULL, &walk_tree_ctx); + ls_tree(commit->tree->object.oid.hash, NULL, &walk_tree_ctx); goto cleanup; }