From e1438b3c8e29e689c7f5a3491c414e2bebdf9655 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Tue, 3 Mar 2026 20:09:51 -0300 Subject: [PATCH] core/manager: Use g_autoptr more In the clients list. --- src/core/gcal-manager.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/core/gcal-manager.c b/src/core/gcal-manager.c index 5c49b5b2..d03a7430 100644 --- a/src/core/gcal-manager.c +++ b/src/core/gcal-manager.c @@ -981,8 +981,7 @@ void gcal_manager_refresh (GcalManager *self) { g_autolist(ESource) collections = NULL; - GList *clients; - GList *l; + g_autoptr(GList) clients = NULL; GCAL_ENTRY; @@ -1009,7 +1008,7 @@ gcal_manager_refresh (GcalManager *self) clients = g_hash_table_get_values (self->clients); /* refresh clients */ - for (l = clients; l != NULL; l = l->next) + for (GList *l = clients; l != NULL; l = l->next) { GcalCalendar *calendar = l->data; EClient *client; @@ -1027,8 +1026,6 @@ gcal_manager_refresh (GcalManager *self) self->clients_synchronizing++; } - g_list_free (clients); - g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SYNCHRONIZING]); GCAL_EXIT;