Files
git-mirror/builtin
Patrick Steinhardt 648abbe22d config: fix leaking comment character config
When the comment line character has been specified multiple times in the
configuration, then `git_default_core_config()` will cause a memory leak
because it unconditionally copies the string into `comment_line_str`
without free'ing the previous value. In fact, it can't easily free the
value in the first place because it may contain a string constant.

Refactor the code such that we track allocated comment character strings
via a separate non-constant variable `comment_line_str_to_free`. Adapt
sites that set `comment_line_str` to set both and free the old value
that was stored in `comment_line_str_to_free`.

This memory leak is being hit in t3404. As there are still other memory
leaks in that file we cannot yet mark it as passing with leak checking
enabled.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-08-14 10:07:58 -07:00
..
2024-07-13 18:10:49 -07:00
2024-05-21 09:07:48 -07:00
2024-07-08 14:53:10 -07:00
2024-07-08 14:53:10 -07:00
2024-04-18 12:30:42 -07:00
2024-04-18 12:30:42 -07:00
2024-04-18 12:30:42 -07:00
2024-07-08 14:53:10 -07:00
2024-02-13 10:18:50 -08:00
2024-06-06 12:49:23 -07:00
2024-04-18 12:30:42 -07:00
2024-07-08 14:53:10 -07:00
2024-06-20 15:45:12 -07:00
2023-07-06 11:54:48 -07:00
2024-04-18 12:30:42 -07:00
2024-07-13 18:10:49 -07:00
2024-05-30 08:55:29 -07:00
2024-07-02 09:59:00 -07:00
2024-04-18 12:30:42 -07:00
2024-05-17 10:33:39 -07:00
2024-06-06 12:49:23 -07:00
2024-04-29 20:42:30 +02:00
2024-04-18 12:30:42 -07:00