[gtk+] gtkstyleproperty: Plug two leaks
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtkstyleproperty: Plug two leaks
- Date: Mon, 30 May 2011 17:35:47 +0000 (UTC)
commit de4ca3ae133eba8fa204113bd41e96996711f141
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon May 30 19:21:42 2011 +0200
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.
gtk/gtkstyleproperty.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkstyleproperty.c b/gtk/gtkstyleproperty.c
index 7ad2399..65cd58b 100644
--- a/gtk/gtkstyleproperty.c
+++ b/gtk/gtkstyleproperty.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]