diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-09-26 13:46:00 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-09-27 08:25:34 -0700 |
commit | 02e36f9ffaf1f2395a19dc10c15423883c7b2817 (patch) | |
tree | f513bdfe0126c7d131882e3268c13bd7860c138c /t/helper/test-submodule-nested-repo-config.c | |
parent | a2b7f03e65ca8c0a5b6d1cbc42866db3df96aeed (diff) |
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 't/helper/test-submodule-nested-repo-config.c')
0 files changed, 0 insertions, 0 deletions