Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
panel-toplevel: fix memory leak in calculate_minimum_height
  • Loading branch information
rcaridade145 authored and raveit65 committed Sep 12, 2018
1 parent 0e32e29 commit 2e35407
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mate-panel/panel-toplevel.c
Expand Up @@ -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;
Expand All @@ -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 ?
Expand Down

0 comments on commit 2e35407

Please sign in to comment.