mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-25 03:32:12 +01:00
GVariant: fix some more leaks in error cases
This commit is contained in:
parent
90c49a0654
commit
d44ae96cb1
@ -1516,6 +1516,7 @@ string_parse (TokenStream *stream,
|
||||
parser_set_error (error, &ref, NULL,
|
||||
"unterminated string constant");
|
||||
g_free (token);
|
||||
g_free (str);
|
||||
return NULL;
|
||||
|
||||
case '\\':
|
||||
@ -1525,12 +1526,14 @@ string_parse (TokenStream *stream,
|
||||
parser_set_error (error, &ref, NULL,
|
||||
"unterminated string constant");
|
||||
g_free (token);
|
||||
g_free (str);
|
||||
return NULL;
|
||||
|
||||
case 'u':
|
||||
if (!unicode_unescape (token, &i, str, &j, 4, &ref, error))
|
||||
{
|
||||
g_free (token);
|
||||
g_free (str);
|
||||
return NULL;
|
||||
}
|
||||
continue;
|
||||
@ -1539,6 +1542,7 @@ string_parse (TokenStream *stream,
|
||||
if (!unicode_unescape (token, &i, str, &j, 8, &ref, error))
|
||||
{
|
||||
g_free (token);
|
||||
g_free (str);
|
||||
return NULL;
|
||||
}
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user