about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--cgit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cgit.c b/cgit.c index ab3fadb..9427c4a 100644 --- a/cgit.c +++ b/cgit.c
@@ -616,11 +616,11 @@ static int prepare_repo_cmd(void)
616 } 616 }
617 617
618 if (get_sha1(ctx.qry.head, sha1)) { 618 if (get_sha1(ctx.qry.head, sha1)) {
619 char *tmp = xstrdup(ctx.qry.head); 619 char *old_head = ctx.qry.head;
620 ctx.qry.head = ctx.repo->defbranch; 620 ctx.qry.head = xstrdup(ctx.repo->defbranch);
621 cgit_print_error_page(404, "Not found", 621 cgit_print_error_page(404, "Not found",
622 "Invalid branch: %s", tmp); 622 "Invalid branch: %s", old_head);
623 free(tmp); 623 free(old_head);
624 return 1; 624 return 1;
625 } 625 }
626 string_list_sort(&ctx.repo->submodules); 626 string_list_sort(&ctx.repo->submodules);