From c6dd4566c66ea86294b854717a50acbe8b04233e Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 14:32:28 -0700 Subject: Free commit and tag records beside their parsers With the frees gone from shared.h, five page files need nothing else from it, so they stop including it. --- source/parsing.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/parsing.h') diff --git a/source/parsing.h b/source/parsing.h index 755d646..c0bdebc 100644 --- a/source/parsing.h +++ b/source/parsing.h @@ -2,7 +2,8 @@ * Readers that turn raw git object bodies and the incoming request URL into * the records cgit renders from. Commit and tag objects arrive as flat text, * so the work here is splitting off the headers and re-encoding the remaining - * free text into the page encoding. + * free text into the page encoding. Each record is freed beside the reader that + * builds it. */ #ifndef CGIT_PARSING_H @@ -18,6 +19,8 @@ extern void cgit_parse_url(const char *url); extern struct string_list *cgit_mailmap(void); extern struct commitinfo *cgit_parse_commit(struct commit *commit); +extern void cgit_free_commitinfo(struct commitinfo *info); extern struct taginfo *cgit_parse_tag(struct tag *tag); +extern void cgit_free_taginfo(struct taginfo *info); #endif // CGIT_PARSING_H -- cgit