aboutsummaryrefslogtreecommitdiffstats
path: root/git.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-09-26 13:46:00 +0200
committerJunio C Hamano <gitster@pobox.com>2024-09-27 08:25:34 -0700
commit02e36f9ffaf1f2395a19dc10c15423883c7b2817 (patch)
treef513bdfe0126c7d131882e3268c13bd7860c138c /git.c
parentMerge branch 'ps/leakfixes-part-6' into ps/leakfixes-part-7 (diff)
downloadgit-02e36f9ffaf1f2395a19dc10c15423883c7b2817.tar.gz
git-02e36f9ffaf1f2395a19dc10c15423883c7b2817.zip
builtin/help: fix dangling reference to `html_path`
In `get_html_page_path()` we may end up assigning the return value of `system_path()` to the global `html_path` variable. But as we also assign the returned value to `to_free`, we will deallocate its memory upon returning from the function. Consequently, `html_path` will now point to deallocated memory. Fix this issue by instead assigning the value to a separate local variable. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
0 files changed, 0 insertions, 0 deletions