]> git.ipfire.org Git - thirdparty/git.git/commit
submodule--helper: fix a memory leak in get_default_remote_submodule()
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Wed, 31 Aug 2022 23:14:17 +0000 (01:14 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 2 Sep 2022 16:18:13 +0000 (09:18 -0700)
commitae3ef94d9bc61931636647c4eab558e09aaeb50a
tree117246f3475645e8fbd254abe7ee5603a440568a
parent17af0a8444523f4df98e21165a3e476f05749237
submodule--helper: fix a memory leak in get_default_remote_submodule()

Fix a memory leak in the get_default_remote_submodule() function added
in a77c3fcb5ec (submodule--helper: get remote names from any
repository, 2022-03-04), we need to repo_clear() the submodule we
initialize.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Reviewed-by: Glen Choo <chooglen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/submodule--helper.c