mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-08 04:45:31 +00:00
mm-provider: Prefer g_clear_*() in dispose() and finalize()
This commit is contained in:
parent
a4f845206e
commit
d0c4374a0b
1 changed files with 3 additions and 6 deletions
|
@ -387,10 +387,7 @@ dispose (GObject *object)
|
||||||
{
|
{
|
||||||
CallsMMProvider *self = CALLS_MM_PROVIDER (object);
|
CallsMMProvider *self = CALLS_MM_PROVIDER (object);
|
||||||
|
|
||||||
if (self->watch_id) {
|
g_clear_handle_id (&self->watch_id, g_bus_unwatch_name);
|
||||||
g_bus_unwatch_name (self->watch_id);
|
|
||||||
self->watch_id = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_list_store_remove_all (self->origins);
|
g_list_store_remove_all (self->origins);
|
||||||
|
|
||||||
|
@ -403,8 +400,8 @@ finalize (GObject *object)
|
||||||
{
|
{
|
||||||
CallsMMProvider *self = CALLS_MM_PROVIDER (object);
|
CallsMMProvider *self = CALLS_MM_PROVIDER (object);
|
||||||
|
|
||||||
g_object_unref (self->origins);
|
g_clear_object (&self->origins);
|
||||||
g_free (self->status);
|
g_clear_pointer (&self->status, g_free);
|
||||||
|
|
||||||
G_OBJECT_CLASS (calls_mm_provider_parent_class)->finalize (object);
|
G_OBJECT_CLASS (calls_mm_provider_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue