Commit de4ca3ae authored by Carlos Garnacho's avatar Carlos Garnacho
Browse files

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.
parent b68172b2
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment