diff options
author | Colomban Wendling <[email protected]> | 2022-06-28 11:25:05 +0200 |
---|---|---|
committer | Luke from DC <[email protected]> | 2022-06-28 18:22:23 +0000 |
commit | 36be054255ff728061c056899c052c790ed43ae1 (patch) | |
tree | 134b4af7e9fa02e6a97e3e04079488d9ccc5d6a9 /libmate-panel-applet | |
parent | 48ef669663d64062a5ed5d90e3e4787445a90859 (diff) | |
download | mate-panel-36be054255ff728061c056899c052c790ed43ae1.tar.bz2 mate-panel-36be054255ff728061c056899c052c790ed43ae1.tar.xz |
panel-applet: Fix leak in no-background code path
Diffstat (limited to 'libmate-panel-applet')
-rw-r--r-- | libmate-panel-applet/mate-panel-applet.c | 5 |
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: |