Merge branch 'gregex-match-info-leak-fix' into 'main'

gregex: Free match info if offset matching recalc failed

See merge request GNOME/glib!2827
This commit is contained in:
Philip Withnall 2022-07-20 13:56:23 +00:00
commit 34e5bb8b43

View File

@ -2241,7 +2241,10 @@ g_regex_match_all_full (const GRegex *regex,
info->workspace, info->n_workspace);
if (!recalc_match_offsets (info, error))
return FALSE;
{
g_match_info_free (info);
return FALSE;
}
if (info->matches == PCRE2_ERROR_DFA_WSSIZE)
{