]> git.ipfire.org Git - thirdparty/git.git/commit
grep API: plug memory leaks by freeing "header_list"
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 6 Feb 2023 23:07:51 +0000 (00:07 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Feb 2023 23:34:39 +0000 (15:34 -0800)
commitfb2ebe72a37423e7c375d933d3c277b8cc81efba
tree5e202171ab5993afc8e43462cd754615f340c01e
parent891c9965fbc05848fb66444274e39c7ae2c6f321
grep API: plug memory leaks by freeing "header_list"

When the "header_list" struct member was added in [1], freeing this
field was neglected. Fix that now, so that commands like

./git -P log -1 --color=always --author=A origin/master

will run leak-free.

1. 80235ba79ef ("log --author=me --grep=it" should find intersection,
   not union, 2010-01-17)

Helped-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
grep.c