]> git.ipfire.org Git - thirdparty/git.git/commit
submodule--helper: free some "displaypath" in "struct update_data"
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Wed, 31 Aug 2022 23:14:22 +0000 (01:14 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 2 Sep 2022 16:18:13 +0000 (09:18 -0700)
commitd40c42e06b1bbeab66b6911b864f57407ad68f95
treec8b706d2919e37fda5077761bfb55b2ac5aec805
parent25b6a95d03fe4fbb7acb8bbd0e1faad9a7f4ea9b
submodule--helper: free some "displaypath" in "struct update_data"

Make the update_data_release() function free "displaypath" member when
appropriate. The "displaypath" member is always ours, the "const" on
the "char *" was wrong to begin with.

This leaves a leak of "displaypath" in update_submodule(), which as
we'll see in subsequent commits is harder to deal with than this
trivial fix.

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
t/t2403-worktree-move.sh
t/t7412-submodule-absorbgitdirs.sh
t/t7419-submodule-set-branch.sh