Files
git/builtin
Ævar Arnfjörð Bjarmason 8fb201d4da submodule--helper: fix most "struct pathspec" memory leaks
Call clear_pathspec() at the end of various functions that work with
and allocate a "struct pathspec".

In some cases the zero-initialization here isn't strictly needed, but
as we're moving to a "goto cleanup" pattern let's make sure that it's
safe to call clear_pathspec(), we don't want the data to be
uninitialized.

E.g. for module_foreach() we can see from looking at
module_list_compute() that if it returns non-zero that the "pathspec"
will always have been initialized. But relying on that both assumes
knowledge about parse_pathspec(), and would set up a fragile pattern
going forward.

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>
2022-09-02 09:18:12 -07:00
..
2022-06-07 14:10:56 -07:00
2022-04-06 09:42:14 -07:00
2022-02-17 16:25:05 -08:00
2021-10-28 09:57:09 -07:00
2022-04-04 10:56:23 -07:00
2022-07-18 13:31:57 -07:00
2022-07-01 11:43:43 -07:00
2022-03-09 13:38:24 -08:00
2022-06-07 14:10:56 -07:00
2022-04-06 15:21:59 -07:00
2021-04-14 13:47:21 -07:00
2022-07-18 13:31:53 -07:00
2022-06-10 15:04:15 -07:00
2022-01-10 11:52:56 -08:00
2022-06-10 15:04:13 -07:00
2021-11-03 13:25:36 -07:00