summaryrefslogtreecommitdiff
path: root/applets/clock/system-timezone.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-11-28 13:19:58 +0100
committerLuke from DC <[email protected]>2021-12-16 06:52:11 +0000
commit6fbabd51619c92bcd8584e1bb2f12f2b52904ea6 (patch)
tree540229310cf7f6d6b60e82fcd2952a6caec31a4a /applets/clock/system-timezone.c
parent94f3ec8c654363cd6a245eb9dca7c54f1b8f5649 (diff)
downloadmate-panel-6fbabd51619c92bcd8584e1bb2f12f2b52904ea6.tar.bz2
mate-panel-6fbabd51619c92bcd8584e1bb2f12f2b52904ea6.tar.xz
Use g_clear_pointer() and g_clear_object()
Diffstat (limited to 'applets/clock/system-timezone.c')
-rw-r--r--applets/clock/system-timezone.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/applets/clock/system-timezone.c b/applets/clock/system-timezone.c
index 801f3386..b7b3d64b 100644
--- a/applets/clock/system-timezone.c
+++ b/applets/clock/system-timezone.c
@@ -234,13 +234,11 @@ system_timezone_finalize (GObject *obj)
systz = SYSTEM_TIMEZONE (obj);
priv = system_timezone_get_instance_private (systz);
- g_free (priv->tz);
- g_free (priv->env_tz);
+ g_clear_pointer (&priv->tz, g_free);
+ g_clear_pointer (&priv->env_tz, g_free);
for (i = 0; i < CHECK_NB; i++) {
- if (priv->monitors[i])
- g_object_unref (priv->monitors[i]);
- priv->monitors[i] = NULL;
+ g_clear_object (&priv->monitors[i]);
}
G_OBJECT_CLASS (system_timezone_parent_class)->finalize (obj);