commit - 5c65becf8546894b17cc8d0598cabad6443d38bb
commit + 53e81e487b1258083f28cdc605a4685043a6185d
blob - 1dc1640df39ae68a8e393d3333c470b9d706f7c8
blob + a809bdcaa28d5b074ac172ff710942051f19c582
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
{
const struct got_error *error = NULL;
struct gw_header *header = NULL, *n_header = NULL;
- char *age = NULL, *age_html = NULL;
+ char *age = NULL;
char *href_diff = NULL, *href_blob = NULL;
char *newline, *smallerthan;
enum kcgi_err kerr = KCGI_OK;
KATTR_ID, "briefs_age", KATTR__MAX);
if (kerr != KCGI_OK)
goto done;
- if (asprintf(&age_html, "%s", age ? age : "") == -1) {
- error = got_error_from_errno("asprintf");
- goto done;
- }
- kerr = khtml_puts(gw_trans->gw_html_req, age_html);
+ kerr = khtml_puts(gw_trans->gw_html_req, age ? age : "");
if (kerr != KCGI_OK)
goto done;
kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
free(age);
age = NULL;
- free(age_html);
- age_html = NULL;
free(href_diff);
href_diff = NULL;
free(href_blob);
TAILQ_FOREACH(n_header, &gw_trans->gw_headers, entry)
gw_free_headers(n_header);
free(age);
- free(age_html);
free(href_diff);
free(href_blob);
if (error == NULL && kerr != KCGI_OK)
const struct got_error *error = NULL;
struct gw_header *header = NULL;
char *tree = NULL, *tree_html = NULL, *tree_html_disp = NULL;
- char *age = NULL, *age_html = NULL;
+ char *age = NULL;
enum kcgi_err kerr;
if (pledge("stdio rpath proc exec sendfd unveil", NULL) == -1)
free(tree_html);
free(tree);
free(age);
- free(age_html);
if (error == NULL && kerr != KCGI_OK)
error = gw_kcgi_error(kerr);
return error;
if (asprintf(&build_folder, "%s/%s",
gw_trans->repo_folder ? gw_trans->repo_folder : "",
got_tree_entry_get_name(te)) == -1) {
- error = got_error_from_errno(
- "asprintf");
+ error = got_error_from_errno("asprintf");
goto done;
}
if (asprintf(&href_blob,