cssparser: Don't use a free'd string in error messages

This commit is contained in:
Benjamin Otte 2012-04-19 17:01:37 +02:00
parent 5510bef70a
commit c69e30d65a

View File

@ -669,15 +669,16 @@ _gtk_css_number_value_parse (GtkCssParser *parser,
break;
}
g_free (unit_name);
if (i >= G_N_ELEMENTS (units))
{
_gtk_css_parser_error (parser, "`%s' is not a valid unit.", unit_name);
g_free (unit_name);
return NULL;
}
unit = units[i].unit;
g_free (unit_name);
}
else
{