[gtk+] Plug a memory leak in the css parser
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Plug a memory leak in the css parser
- Date: Tue, 17 Sep 2013 03:31:56 +0000 (UTC)
commit dbbb9c8f8f432e92ac5c9cceabe953f37dec031b
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Sep 16 23:30:57 2013 -0400
Plug a memory leak in the css parser
color_value_parse was leaking a GtkCssSymbolicValue.
Reported in
https://bugzilla.gnome.org/show_bug.cgi?id=702034
gtk/gtkcssstylefuncs.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcssstylefuncs.c b/gtk/gtkcssstylefuncs.c
index 3a5e10c..426d3ee 100644
--- a/gtk/gtkcssstylefuncs.c
+++ b/gtk/gtkcssstylefuncs.c
@@ -256,7 +256,7 @@ rgba_value_compute (GtkStyleProviderPrivate *provider,
G_GNUC_END_IGNORE_DEPRECATIONS;
}
-static gboolean
+static gboolean
color_value_parse (GtkCssParser *parser,
GValue *value)
{
@@ -278,6 +278,7 @@ color_value_parse (GtkCssParser *parser,
color.blue = rgba.blue * 65535. + 0.5;
g_value_set_boxed (value, &color);
+ gtk_symbolic_color_unref (symbolic);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]