git/builtin
Lidong Yan bfc9f9cc64 builtin/submodule--helper: fix leak when remote_submodule_branch() failed
In builtin/submodule--helper.c:update_submodule(), the variable
remote_name is allocated in get_default_remote_submodule() but
may be leaked if remote_submodule_branch() fails. Although it is
unlikely that remote_submodule_branch() would fail after successfully
obtaining a remote ref name from get_default_remote_submodule(),
it is still possible. To prevent a potential memory leak, add a
call to free(remote_name) at the early exit point.

Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-06-08 08:49:48 -07:00
..
2025-02-18 15:30:31 -08:00
2025-01-21 08:44:54 -08:00
2024-12-13 07:33:36 -08:00
2025-01-28 13:02:22 -08:00
2024-12-18 10:44:31 -08:00
2024-12-18 10:44:30 -08:00
2025-02-10 10:18:31 -08:00
2024-12-18 10:44:31 -08:00
2024-12-18 10:44:30 -08:00
2025-02-04 09:51:41 -08:00
2025-03-03 14:51:29 -08:00
2024-12-18 10:44:30 -08:00
2025-01-28 13:02:22 -08:00