As I had stated several times, I was really unhappy how the original fix harped on nedmalloc and totally ignored runtime-configured custom allocators. So this is, at long last, my attempt to give this a new life. It is based off of maint and needs trivial merge conflict resolutions relative to master . Changes since v1: * I managed to mess up the authorship of 3/3. Sorry for that. I fixed it, so that Carlo is shown as author again. Carlo Marcelo Arenas Belón (3): grep: make PCRE1 aware of custom allocator grep: make PCRE2 aware of custom allocator grep: avoid leak of chartables in PCRE2 builtin/grep.c | 1 + grep.c | 47 ++++++++++++++++++++++++++++++++++++++++++++--- grep.h | 2 ++ 3 files changed, 47 insertions(+), 3 deletions(-) base-commit: 51cf315870bbb7254ddf06c84fe03b41bc48eebd Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-402%2Fdscho%2Fpcre2-chartables-leakfix-v2 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-402/dscho/pcre2-chartables-leakfix-v2 Pull-Request: https://github.com/gitgitgadget/git/pull/402 Range-diff vs v1: 1: 4feb8cc83a = 1: 4feb8cc83a grep: make PCRE1 aware of custom allocator 2: 191d3a2280 = 2: 191d3a2280 grep: make PCRE2 aware of custom allocator 3: f21b2c9eb5 ! 3: f8724fb267 grep: avoid leak of chartables in PCRE2 @@ -1,4 +1,4 @@ -Author: Johannes Schindelin <johannes.schindelin@xxxxxx> +Author: Carlo Marcelo Arenas Belón <carenas@xxxxxxxxx> grep: avoid leak of chartables in PCRE2 -- gitgitgadget