[gnome-calendar] time-zone-monitor: Fix timezone leak on timezone changes



commit a0d24cd5d8f69a9b8e15b5bb1084639db4426f1b
Author: Sebastian Keller <skeller gnome org>
Date:   Mon Apr 5 22:43:01 2021 +0200

    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));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]