gtkstyleproperty: Plug two leaks

In rgba_value_parse(), unref the symbolic color once we've resolved it.
In gradient_value_parse(), take the GtkGradient so we leave no dangling
references.
This commit is contained in:
Carlos Garnacho 2011-05-30 19:21:42 +02:00
parent b68172b2c6
commit de4ca3ae13

View File

@ -77,6 +77,7 @@ rgba_value_parse (GtkCssParser *parser,
if (gtk_symbolic_color_resolve (symbolic, NULL, &rgba))
{
g_value_set_boxed (value, &rgba);
gtk_symbolic_color_unref (symbolic);
}
else
{
@ -711,7 +712,7 @@ gradient_value_parse (GtkCssParser *parser,
return FALSE;
}
g_value_set_boxed (value, gradient);
g_value_take_boxed (value, gradient);
return TRUE;
}