Backport patch fixing memory leak for PCRE2 present upstream. Fixes: #22428 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>