X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/51d9176e4bb5c619481355c6b895c6dec30c4f82..6edc84bc44d55d7f90a40238ae2107913e15f54b:/ui-repolist.c diff --git a/ui-repolist.c b/ui-repolist.c index ac1b3e3..8d982c4 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -15,11 +15,13 @@ static time_t read_agefile(char *path) { time_t result; size_t size; - char *buf; + char *buf = NULL; struct strbuf date_buf = STRBUF_INIT; - if (readfile(path, &buf, &size)) + if (readfile(path, &buf, &size)) { + free(buf); return -1; + } if (parse_date(buf, &date_buf) == 0) result = strtoul(date_buf.buf, NULL, 10); @@ -106,14 +108,16 @@ static int is_in_url(struct cgit_repo *repo) static void print_sort_header(const char *title, const char *sort) { + char *currenturl = cgit_currenturl(); html("