summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-09-26 13:46:54 +0200
committerJunio C Hamano <gitster@pobox.com>2024-09-27 08:25:36 -0700
commit6d82437a470fc7797e41f5a7ac4874914db7cdb8 (patch)
tree466a9227d9b5d973b8552956bdc92b849fd40227 /diff.c
parentf8d2ca7246394535dff520aac6d1a66a5a807b75 (diff)
grep: fix leaking grep pattern
When creating a pattern via `create_grep_pat()` we allocate the pattern member of the structure regardless of the token type. But later, when we try to free the structure, we free the pattern member conditionally on the token type and thus leak memory. Plug this leak. The leak is exposed by t7814, but plugging it alone does not make the whole test suite pass. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
0 files changed, 0 insertions, 0 deletions