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,
|
parser_set_error (error, &ref, NULL,
|
||||||
"unterminated string constant");
|
"unterminated string constant");
|
||||||
g_free (token);
|
g_free (token);
|
||||||
|
g_free (str);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
case '\\':
|
case '\\':
|
||||||
@ -1525,12 +1526,14 @@ string_parse (TokenStream *stream,
|
|||||||
parser_set_error (error, &ref, NULL,
|
parser_set_error (error, &ref, NULL,
|
||||||
"unterminated string constant");
|
"unterminated string constant");
|
||||||
g_free (token);
|
g_free (token);
|
||||||
|
g_free (str);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
case 'u':
|
case 'u':
|
||||||
if (!unicode_unescape (token, &i, str, &j, 4, &ref, error))
|
if (!unicode_unescape (token, &i, str, &j, 4, &ref, error))
|
||||||
{
|
{
|
||||||
g_free (token);
|
g_free (token);
|
||||||
|
g_free (str);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
@ -1539,6 +1542,7 @@ string_parse (TokenStream *stream,
|
|||||||
if (!unicode_unescape (token, &i, str, &j, 8, &ref, error))
|
if (!unicode_unescape (token, &i, str, &j, 8, &ref, error))
|
||||||
{
|
{
|
||||||
g_free (token);
|
g_free (token);
|
||||||
|
g_free (str);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user