[epiphany/gnome-3-8] ephy-notebook: fix memory leak
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-8] ephy-notebook: fix memory leak
- Date: Tue, 26 Mar 2013 12:44:35 +0000 (UTC)
commit ee67349ea1233965b2c8060f6ed197c593dcdcdd
Author: Xan Lopez <xan igalia com>
Date: Mon Mar 25 22:53:36 2013 +0100
ephy-notebook: fix memory leak
gtk_style_context_get does return a copy of the requested properties,
free our pango font description.
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 f9a9007..b09ff55 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]