summaryrefslogtreecommitdiff
path: root/plugins/xsettings
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-05-19 18:38:53 +0200
committerraveit65 <[email protected]>2020-06-13 09:20:40 +0200
commit9ac072ffb075fe009989a410a2018b8d30d0c01c (patch)
treece1123c2b7c944413339f094c11fdba4aee9f855 /plugins/xsettings
parentd91039ed8fdf6e33ff076a9cb236478576f26515 (diff)
downloadmate-settings-daemon-9ac072ffb075fe009989a410a2018b8d30d0c01c.tar.bz2
mate-settings-daemon-9ac072ffb075fe009989a410a2018b8d30d0c01c.tar.xz
plugin xsettings: Fix memory leak on delayed_toggle_bg_draw
Diffstat (limited to 'plugins/xsettings')
-rw-r--r--plugins/xsettings/msd-xsettings-manager.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/xsettings/msd-xsettings-manager.c b/plugins/xsettings/msd-xsettings-manager.c
index 3e7392e..72c87cc 100644
--- a/plugins/xsettings/msd-xsettings-manager.c
+++ b/plugins/xsettings/msd-xsettings-manager.c
@@ -508,8 +508,11 @@ static gboolean
delayed_toggle_bg_draw (gboolean value)
{
GSettings *settings;
+
settings = g_settings_new ("org.mate.background");
g_settings_set_boolean (settings, "show-desktop-icons", value);
+ g_object_unref (settings);
+
return FALSE;
}
@@ -574,6 +577,7 @@ scale_change_workarounds (MateXSettingsManager *manager, int new_scale)
g_timeout_add_seconds (1, (GSourceFunc) delayed_toggle_bg_draw, (gpointer) FALSE);
g_timeout_add_seconds (2, (GSourceFunc) delayed_toggle_bg_draw, (gpointer) TRUE);
}
+ g_object_unref (desktop_settings);
}
/* Store new scale value */