gout

A static git page generator
git clone https://git.bracken.jp/gout.git
Log | Files | Refs | README | LICENSE

commit 890eaf6fa984dee1bc2bbbd794d94074ef367778
parent 97cfdef3c673313f4d9dc474e057687c87db97dd
Author: Chris Bracken <chris@bracken.jp>
Date:   Fri,  6 Mar 2026 17:53:18 +0900

fs: fix leak in in-memory test filesystem

If we exceeded MAX_MOCK_FILES, we were leaking the content buffer. Only
affects test code.

Diffstat:
Msrc/fs_inmemory.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/fs_inmemory.c b/src/fs_inmemory.c @@ -162,6 +162,8 @@ static int inmemory_rename(const char* oldpath, const char* newpath) { file->path = estrdup(newpath); file->buf = content; file->size = fsize; + } else { + free(content); } } unlink(oldpath);