diff options
author | Carlo Marcelo Arenas Belón <carenas@gmail.com> | 2019-10-16 12:10:24 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-18 10:33:18 +0900 |
commit | 10da030ab757c38a01507bf18e2484698000b791 (patch) | |
tree | 9fd73fe2498216cbae48b9a81dbe848d565c8d01 /grep.h | |
parent | grep: make PCRE2 aware of custom allocator (diff) | |
download | tgif-10da030ab757c38a01507bf18e2484698000b791.tar.xz |
grep: avoid leak of chartables in PCRE2
94da9193a6 ("grep: add support for PCRE v2", 2017-06-01) introduced
a small memory leak visible with valgrind in t7813.
Complete the creation of a PCRE2 specific variable that was missing from
the original change and free the generated table just like it is done
for PCRE1.
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'grep.h')
-rw-r--r-- | grep.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -96,6 +96,7 @@ struct grep_pat { pcre2_compile_context *pcre2_compile_context; pcre2_match_context *pcre2_match_context; pcre2_jit_stack *pcre2_jit_stack; + const uint8_t *pcre2_tables; uint32_t pcre2_jit_on; kwset_t kws; unsigned fixed:1; |