X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/979db79a80f1926c677691b68eb22b4852a77b50..1c581a072651524f3b0d91f33e22a42c4166dd96:/ui-plain.c diff --git a/ui-plain.c b/ui-plain.c index 4c73607..58addab 100644 --- a/ui-plain.c +++ b/ui-plain.c @@ -84,8 +84,10 @@ static void print_dir(const unsigned char *sha1, const char *base, slash = strrchr(fullpath, '/'); if (slash) *(slash + 1) = 0; - else + else { + free(fullpath); fullpath = NULL; + } html("
  • "); cgit_plain_link("../", NULL, NULL, ctx.qry.head, ctx.qry.sha1, fullpath); @@ -181,7 +183,7 @@ void cgit_print_plain(void) if (!path_items.match) { path_items.match = ""; walk_tree_ctx.match_baselen = -1; - print_dir(commit->tree->object.sha1, "", 0, ""); + print_dir(commit->tree->object.oid.hash, "", 0, ""); walk_tree_ctx.match = 2; } else