[gtk+] cssprovider: plug two more leak fixes
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] cssprovider: plug two more leak fixes
- Date: Mon, 7 Mar 2011 22:20:41 +0000 (UTC)
commit aa6eee73e54a846644b515a1fa45c49955cac363
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Mar 7 22:59:45 2011 +0100
cssprovider: plug two more leak fixes
gtk/gtkcssprovider.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index be6fbd7..4bd6c56 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -835,6 +835,7 @@ static void gtk_css_style_provider_iface_init (GtkStyleProviderIface *iface);
static void scanner_apply_scope (GScanner *scanner,
ParserScope scope);
+static void css_provider_reset_parser (GtkCssProvider *css_provider);
static gboolean css_provider_parse_value (GtkCssProvider *css_provider,
const gchar *value_str,
GValue *value,
@@ -1469,6 +1470,8 @@ gtk_css_provider_finalize (GObject *object)
css_provider = GTK_CSS_PROVIDER (object);
priv = css_provider->priv;
+ css_provider_reset_parser (css_provider);
+
g_scanner_destroy (priv->scanner);
g_free (priv->filename);
@@ -2463,6 +2466,8 @@ gradient_parse_str (const gchar *str,
if (*str != ')')
{
+ if (color)
+ gtk_symbolic_color_unref (color);
*end_ptr = (gchar *) str;
return gradient;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]