From f57778e71e4d49cacfa4ece2b44ba0d9ea6f207a Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Thu, 13 Sep 2012 13:48:43 -0400 Subject: [PATCH] stylecontext: fix a StyleData refleak We were failing to unref the style data in some code paths. https://bugzilla.gnome.org/show_bug.cgi?id=683627 --- gtk/gtkstylecontext.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index 0b3cf0486..63ac1defa 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -3169,8 +3169,6 @@ _gtk_style_context_validate (GtkStyleContext *context, data = style_data_lookup (context); changes = _gtk_css_computed_values_get_difference (data->store, current->store); - - style_data_unref (current); } else { @@ -3190,6 +3188,9 @@ _gtk_style_context_validate (GtkStyleContext *context, gtk_style_context_update_cache (context, parent_changes); } + if (current) + style_data_unref (current); + if (change & GTK_CSS_CHANGE_ANIMATE && gtk_style_context_is_animating (context)) { -- 2.43.2