submodule--helper: avoid memory leak when fetching submodules
commit41a86b64c093a6f36ffe0959aeed2e3f2590c7e8
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 15 Jun 2022 23:35:41 +0000 (15 23:35 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 Jun 2022 20:22:03 +0000 (16 13:22 -0700)
treea750c35e5c5e9179cde66382f18cd6e0f100bd31
parentf53559227ccb600f4fdd1bfe08e1164a5aed60b5
submodule--helper: avoid memory leak when fetching submodules

In c51f8f94e5b3 (submodule--helper: run update procedures from C,
2021-08-24), we added code that first obtains the default remote, and
then adds that to a `strvec`.

However, we never released the default remote's memory.

Reported by Coverity.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/submodule--helper.c