From 90ce0fcb540505c90b0532c2835f633f94264e11 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 13:28:22 -0700 Subject: Stop copying a snapshot's type and name --- source/ui-snapshot.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source') diff --git a/source/ui-snapshot.c b/source/ui-snapshot.c index ffd0b0b..321bf61 100644 --- a/source/ui-snapshot.c +++ b/source/ui-snapshot.c @@ -245,8 +245,8 @@ static void send_snapshot(const struct cgit_snapshot_format *format, const char format->compressor[0]); return; } - ctx.page.mimetype = xstrdup(format->mimetype); - ctx.page.filename = xstrdup(filename); + ctx.page.mimetype = format->mimetype; + ctx.page.filename = filename; cgit_print_http_headers(); init_archivers(); // The archiver reads its arguments as a command line, so it gets the @@ -285,8 +285,8 @@ static void send_sig(const struct cgit_snapshot_format *format, const char *hex, } ctx.page.untrusted = 1; - ctx.page.mimetype = xstrdup("application/pgp-signature"); - ctx.page.filename = xstrdup(sig_filename); + ctx.page.mimetype = "application/pgp-signature"; + ctx.page.filename = sig_filename; cgit_print_http_headers(); html_raw(buf, size); -- cgit