From e1bfb5b674c31e81465fc8307b28abc22260ccd6 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Tue, 28 Jun 2022 11:25:05 +0200 Subject: panel-applet: Fix leak in no-background code path --- libmate-panel-applet/mate-panel-applet.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libmate-panel-applet/mate-panel-applet.c b/libmate-panel-applet/mate-panel-applet.c index c08e5cc2..38af2c38 100644 --- a/libmate-panel-applet/mate-panel-applet.c +++ b/libmate-panel-applet/mate-panel-applet.c @@ -1625,8 +1625,9 @@ mate_panel_applet_change_background(MatePanelApplet *applet, switch (type) { case PANEL_NO_BACKGROUND: if (priv->out_of_process){ - pattern = cairo_pattern_create_rgba (0,0,0,0); /* Using NULL here breaks transparent */ - gdk_window_set_background_pattern(window,pattern); /* backgrounds set by GTK theme */ + cairo_pattern_t *transparent = cairo_pattern_create_rgba (0, 0, 0, 0); /* Using NULL here breaks transparent */ + gdk_window_set_background_pattern (window, transparent); /* backgrounds set by GTK theme */ + cairo_pattern_destroy (transparent); } break; case PANEL_COLOR_BACKGROUND: -- cgit v1.2.1