From 8d95c901cb97c847d3530e3ca30d3cd431a9efc3 Mon Sep 17 00:00:00 2001 From: rbuj Date: Tue, 19 May 2020 18:38:53 +0200 Subject: plugin xsettings: Fix memory leak on delayed_toggle_bg_draw --- plugins/xsettings/msd-xsettings-manager.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins') diff --git a/plugins/xsettings/msd-xsettings-manager.c b/plugins/xsettings/msd-xsettings-manager.c index 48bd702..7fa51ca 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 */ -- cgit v1.2.1