From a0d24cd5d8f69a9b8e15b5bb1084639db4426f1b Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Mon, 5 Apr 2021 22:43:01 +0200 Subject: [PATCH] time-zone-monitor: Fix timezone leak on timezone changes The old timezone was never being unref'ed before it got overwritten. --- src/core/gcal-time-zone-monitor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/gcal-time-zone-monitor.c b/src/core/gcal-time-zone-monitor.c index 35f92d1a..745a71d6 100644 --- a/src/core/gcal-time-zone-monitor.c +++ b/src/core/gcal-time-zone-monitor.c @@ -71,6 +71,7 @@ on_timedate1_proxy_properties_changed_cb (GcalTimeZoneMonitor *self, if (timezone_variant) timezone_identifier = g_variant_get_string (timezone_variant, NULL); + g_clear_pointer (&self->timezone, g_time_zone_unref); self->timezone = g_time_zone_new_identifier (timezone_identifier); g_debug ("System timezone is %s", g_time_zone_get_identifier (self->timezone));