aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2013-03-26 05:53:36 +0800
committerXan Lopez <xan@igalia.com>2013-03-26 05:53:36 +0800
commit944b0072761ba5d6338ac1044ae8280fd8b142bc (patch)
tree427265d72efe30c81dca0f0a8ca2cfffd2311944
parenta48ed2ac052a60885a005bda9323002c87340972 (diff)
downloadgsoc2013-epiphany-944b0072761ba5d6338ac1044ae8280fd8b142bc.tar
gsoc2013-epiphany-944b0072761ba5d6338ac1044ae8280fd8b142bc.tar.gz
gsoc2013-epiphany-944b0072761ba5d6338ac1044ae8280fd8b142bc.tar.bz2
gsoc2013-epiphany-944b0072761ba5d6338ac1044ae8280fd8b142bc.tar.lz
gsoc2013-epiphany-944b0072761ba5d6338ac1044ae8280fd8b142bc.tar.xz
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.
-rw-r--r--src/ephy-notebook.c3
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);