summaryrefslogtreecommitdiff
path: root/libmate-panel-applet/mate-panel-applet.c
diff options
context:
space:
mode:
authorColomban Wendling <[email protected]>2022-06-28 11:25:05 +0200
committerLuke from DC <[email protected]>2022-06-28 18:22:23 +0000
commit36be054255ff728061c056899c052c790ed43ae1 (patch)
tree134b4af7e9fa02e6a97e3e04079488d9ccc5d6a9 /libmate-panel-applet/mate-panel-applet.c
parent48ef669663d64062a5ed5d90e3e4787445a90859 (diff)
downloadmate-panel-36be054255ff728061c056899c052c790ed43ae1.tar.bz2
mate-panel-36be054255ff728061c056899c052c790ed43ae1.tar.xz
panel-applet: Fix leak in no-background code path
Diffstat (limited to 'libmate-panel-applet/mate-panel-applet.c')
-rw-r--r--libmate-panel-applet/mate-panel-applet.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libmate-panel-applet/mate-panel-applet.c b/libmate-panel-applet/mate-panel-applet.c
index cd015eb1..026ee941 100644
--- a/libmate-panel-applet/mate-panel-applet.c
+++ b/libmate-panel-applet/mate-panel-applet.c
@@ -1610,8 +1610,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: