]> git.ipfire.org Git - thirdparty/git.git/commit
repository: avoid leaking `fsmonitor` data
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 12 Apr 2024 08:49:58 +0000 (10:49 +0200)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 12 Apr 2024 09:09:50 +0000 (11:09 +0200)
commit6741e917def23aff497ace35aa34debd1782330a
tree3cfef91fbe8781fde071c66a266aff279f76fe2d
parent0d1bd1dfb37ef25e1911777c94129fc769ffec38
repository: avoid leaking `fsmonitor` data

The `fsmonitor` repo-setting data is allocated lazily. It needs to be
released in `repo_clear()` along the rest of the allocated data in
`repository`.

This is needed because the next commit will merge v2.39.4, which will
add a `git checkout --recurse-modules` call (which would leak memory
without this here fix) to an otherwise leak-free test script.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
repository.c