scalar: fix leaking repositories

In the scalar code we iterate through multiple repositories,
initializing each of them. We never clear them though, causing memory
leaks. Plug them.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2024-09-30 11:13:15 +02:00
committed by Junio C Hamano
parent a69d120c07
commit d607bd8816
3 changed files with 3 additions and 0 deletions

View File

@ -732,6 +732,7 @@ static int cmd_reconfigure(int argc, const char **argv)
succeeded = 1;
the_repository = old_repo;
repo_clear(&r);
loop_end:
if (!succeeded) {