summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Caridade <[email protected]>2018-09-10 21:37:40 +0100
committerraveit65 <[email protected]>2018-09-12 22:46:35 +0200
commit2e35407bfe71cf0c9c5911102daf8ed2e7246d89 (patch)
tree2977ec024eb4349dcac5a9484d3b26ee95d2313b
parent0e32e29fcc1dfda6b8764c7a7fda11aa9830065e (diff)
downloadmate-panel-2e35407bfe71cf0c9c5911102daf8ed2e7246d89.tar.bz2
mate-panel-2e35407bfe71cf0c9c5911102daf8ed2e7246d89.tar.xz
panel-toplevel: fix memory leak in calculate_minimum_height
Origin commit : https://github.com/GNOME/gnome-panel/commit/19129513e9dbfef9a985e0666d98d60a9e7b2779#diff-97cdffd8b53134e4fdfdd45b4a862042R2144
-rw-r--r--mate-panel/panel-toplevel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mate-panel/panel-toplevel.c b/mate-panel/panel-toplevel.c
index d9456f22..0b338d07 100644
--- a/mate-panel/panel-toplevel.c
+++ b/mate-panel/panel-toplevel.c
@@ -2317,7 +2317,7 @@ calculate_minimum_height (GtkWidget *widget,
{
GtkStateFlags state;
GtkStyleContext *style_context;
- const PangoFontDescription *font_desc;
+ PangoFontDescription *font_desc;
GtkBorder padding;
PangoContext *pango_context;
PangoFontMetrics *metrics;
@@ -2338,6 +2338,7 @@ calculate_minimum_height (GtkWidget *widget,
ascent = pango_font_metrics_get_ascent (metrics);
descent = pango_font_metrics_get_descent (metrics);
+ pango_font_description_free (font_desc);
pango_font_metrics_unref (metrics);
thickness = orientation & PANEL_HORIZONTAL_MASK ?