]> git.ipfire.org Git - thirdparty/git.git/commit
grep: avoid leak of chartables in PCRE2
authorCarlo Marcelo Arenas Belón <carenas@gmail.com>
Wed, 16 Oct 2019 12:10:24 +0000 (12:10 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 18 Oct 2019 01:33:18 +0000 (10:33 +0900)
commit10da030ab757c38a01507bf18e2484698000b791
tree9fd73fe2498216cbae48b9a81dbe848d565c8d01
parent513f2b0bbd47015640723a10210c527839e8946a
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>
grep.c
grep.h