setup: fix leaking repository format
commit9972cd6004ac46a919d2e8773be976ef1e2d6a65
authorPatrick Steinhardt <ps@pks.im>
Mon, 6 Nov 2023 10:46:05 +0000 (6 11:46 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Nov 2023 23:51:41 +0000 (7 08:51 +0900)
tree7f17ea08cb8fe64e533fcbdb6dd5107f752d508b
parent4ce14e13250e824b7d410d9bff88061525346a15
setup: fix leaking repository format

While populating the `repository_format` structure may cause us to
allocate memory, we do not call `clear_repository_format()` in some
places and thus potentially leak memory. Fix this.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
setup.c