1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2025-01-07 04:15:32 +00:00

mm-provider: Prefer g_clear_*() in dispose() and finalize()

This commit is contained in:
Evangelos Ribeiro Tzaras 2022-09-03 10:51:57 +02:00
parent a4f845206e
commit d0c4374a0b

View file

@ -387,10 +387,7 @@ dispose (GObject *object)
{
CallsMMProvider *self = CALLS_MM_PROVIDER (object);
if (self->watch_id) {
g_bus_unwatch_name (self->watch_id);
self->watch_id = 0;
}
g_clear_handle_id (&self->watch_id, g_bus_unwatch_name);
g_list_store_remove_all (self->origins);
@ -403,8 +400,8 @@ finalize (GObject *object)
{
CallsMMProvider *self = CALLS_MM_PROVIDER (object);
g_object_unref (self->origins);
g_free (self->status);
g_clear_object (&self->origins);
g_clear_pointer (&self->status, g_free);
G_OBJECT_CLASS (calls_mm_provider_parent_class)->finalize (object);
}