csstokenizer: Plug a leak

This commit is contained in:
Timm Bäder 2019-11-19 09:37:45 +01:00
parent ecc40cf115
commit 581f5bd749

View File

@ -862,7 +862,7 @@ gtk_css_tokenizer_read_name (GtkCssTokenizer *tokenizer)
g_string_append_unichar (string, 0xFFFD); g_string_append_unichar (string, 0xFFFD);
break; break;
} }
gtk_css_tokenizer_consume_char (tokenizer, string); gtk_css_tokenizer_consume_char (tokenizer, string);
} }
} }
@ -994,10 +994,11 @@ gtk_css_tokenizer_read_ident_like (GtkCssTokenizer *tokenizer,
if (*data != '"' && *data != '\'') if (*data != '"' && *data != '\'')
{ {
g_free (name);
return gtk_css_tokenizer_read_url (tokenizer, token, error); return gtk_css_tokenizer_read_url (tokenizer, token, error);
} }
} }
gtk_css_token_init (token, GTK_CSS_TOKEN_FUNCTION, name); gtk_css_token_init (token, GTK_CSS_TOKEN_FUNCTION, name);
return TRUE; return TRUE;
} }