diff options
author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2022-07-20 06:32:30 +0200 |
---|---|---|
committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2022-07-20 06:32:30 +0200 |
commit | 6c93ac876f71d7221a172e430ca450b6c0b8b699 (patch) | |
tree | 9c6df55505315b5fb9e159cb9f001554da522692 /glib | |
parent | c1eb93d2a264372f35f140fef3777aea20595f71 (diff) | |
download | glib-6c93ac876f71d7221a172e430ca450b6c0b8b699.tar.gz |
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
Diffstat (limited to 'glib')
-rw-r--r-- | glib/gregex.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/glib/gregex.c b/glib/gregex.c index 5fc7b16bc..be03f0e09 100644 --- a/glib/gregex.c +++ b/glib/gregex.c @@ -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) { |