]> git.ipfire.org Git - thirdparty/git.git/commit
submodule--helper: "struct pathspec" memory leak in module_update()
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Wed, 31 Aug 2022 23:14:11 +0000 (01:14 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 2 Sep 2022 16:18:12 +0000 (09:18 -0700)
commit4b9d12460d18d02bf6f12cc3c96340e53acf03e3
treefb1edeb7ba896c0a5ccd4aab0786a9803d8eeef3
parent8fb201d4da0e9244f44dabdb1a5f5ea2809b2270
submodule--helper: "struct pathspec" memory leak in module_update()

The module_update() function calls module_list_compute() twice, which
in turn will reset the "struct pathspec" passed to it. Let's instead
track two of them, and clear them both.

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