From ca884dc666a59f8fd236b84413fe96f08215b5a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 28 May 2021 22:59:24 +0200 Subject: [PATCH] display-panel: Clear the variant builder if not showing an OSD When we've only one monitor active we are not showing the OSD but we're leaking the variant used to request the shell to show the OSDs. --- panels/display/cc-display-panel.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c index 93c983f89..f9d4ae044 100644 --- a/panels/display/cc-display-panel.c +++ b/panels/display/cc-display-panel.c @@ -382,7 +382,10 @@ monitor_labeler_show (CcDisplayPanel *self) g_variant_builder_close (&builder); if (number < 2) - return monitor_labeler_hide (self); + { + g_variant_builder_clear (&builder); + return monitor_labeler_hide (self); + } g_dbus_proxy_call (self->shell_proxy, "ShowMonitorLabels",