forked from AuroraMiddleware/gtk
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:
parent
b68172b2c6
commit
de4ca3ae13
@ -77,6 +77,7 @@ rgba_value_parse (GtkCssParser *parser,
|
|||||||
if (gtk_symbolic_color_resolve (symbolic, NULL, &rgba))
|
if (gtk_symbolic_color_resolve (symbolic, NULL, &rgba))
|
||||||
{
|
{
|
||||||
g_value_set_boxed (value, &rgba);
|
g_value_set_boxed (value, &rgba);
|
||||||
|
gtk_symbolic_color_unref (symbolic);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -711,7 +712,7 @@ gradient_value_parse (GtkCssParser *parser,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_value_set_boxed (value, gradient);
|
g_value_take_boxed (value, gradient);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user