]> git.ipfire.org Git - thirdparty/git.git/commit
convert: fix leaking config strings
authorPatrick Steinhardt <ps@pks.im>
Thu, 1 Aug 2024 10:41:11 +0000 (12:41 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 1 Aug 2024 15:47:38 +0000 (08:47 -0700)
commit9642479a2b62f7a3f3bf6086c02157c745bb5d74
treeb71cb77986a281c689b60ed51c397b9d11dce212
parent1f0899978109d732abe5b4825b5cfa40ef1d5885
convert: fix leaking config strings

In `read_convert_config()`, we end up reading some string values into
variables. We don't free any potentially-existing old values though,
which will result in a memory leak in case the same key has been defined
multiple times.

Fix those leaks.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
convert.c
t/t0021-conversion.sh