diff options
author | Xan Lopez <xan@igalia.com> | 2013-03-26 05:53:36 +0800 |
---|---|---|
committer | Xan Lopez <xan@igalia.com> | 2013-03-26 05:53:36 +0800 |
commit | 944b0072761ba5d6338ac1044ae8280fd8b142bc (patch) | |
tree | 427265d72efe30c81dca0f0a8ca2cfffd2311944 /src | |
parent | a48ed2ac052a60885a005bda9323002c87340972 (diff) | |
download | gsoc2013-epiphany-944b0072761ba5d6338ac1044ae8280fd8b142bc.tar.gz gsoc2013-epiphany-944b0072761ba5d6338ac1044ae8280fd8b142bc.tar.zst gsoc2013-epiphany-944b0072761ba5d6338ac1044ae8280fd8b142bc.zip |
ephy-notebook: fix memory leak
gtk_style_context_get does return a copy of the requested properties,
free our pango font description.
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-notebook.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c index f9a9007c6..b09ff55c9 100644 --- a/src/ephy-notebook.c +++ b/src/ephy-notebook.c @@ -531,7 +531,7 @@ tab_label_style_set_cb (GtkWidget *hbox, PangoFontMetrics *metrics; PangoContext *context; GtkStyleContext *style; - const PangoFontDescription *font_desc; + PangoFontDescription *font_desc; GtkWidget *button; int char_width, h, w; @@ -542,6 +542,7 @@ tab_label_style_set_cb (GtkWidget *hbox, metrics = pango_context_get_metrics (context, font_desc, pango_context_get_language (context)); + pango_font_description_free (font_desc); char_width = pango_font_metrics_get_approximate_digit_width (metrics); pango_font_metrics_unref (metrics); |