Diff options
Diffstat (limited to 'source/ui-commit.c')
-rw-r--r--source/ui-commit.c7
1 file changed, 2 insertions, 5 deletions
diff --git a/source/ui-commit.c b/source/ui-commit.c
index 63f2b7e..ce00cf0 100644
--- a/source/ui-commit.c
+++ b/source/ui-commit.c
@@ -247,7 +247,6 @@ void cgit_print_commit(char *hex, const char *prefix)
struct object_id oid, first_oid;
const char *commit_hex;
char *first_parent;
- char *tree_rev;
int parents;
if (!hex)
@@ -293,13 +292,11 @@ void cgit_print_commit(char *hex, const char *prefix)
parents = print_parent_rows(commit, hex, prefix, &first_oid);
html("<tr><th scope='row'>tree</th><td colspan='2' class='oid'><div class='spanning'>");
- tree_rev = xstrdup(hex);
- cgit_tree_link(oid_to_hex(get_commit_tree_oid(commit)), NULL, NULL, ctx.qry.head, tree_rev, NULL);
+ cgit_tree_link(oid_to_hex(get_commit_tree_oid(commit)), NULL, NULL, ctx.qry.head, hex, NULL);
if (prefix) {
html(" /");
- cgit_tree_link(prefix, NULL, NULL, ctx.qry.head, tree_rev, prefix);
+ cgit_tree_link(prefix, NULL, NULL, ctx.qry.head, hex, prefix);
}
- free(tree_rev);
html("</div></td></tr>\n");
if (ctx.repo->snapshots) {