gregex: Free match info if offset matching recalc failed

It's not probably ever happening in practice, but coverity found it and
it's easy enough to fix it.

Coverity CID: #1490730
This commit is contained in:
Marco Trevisan (Treviño)
2022-07-20 06:32:30 +02:00
parent c1eb93d2a2
commit 6c93ac876f

View File

@@ -2237,7 +2237,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)
{