a11y: Clean up properly in unregister_object

Things that are set up in register_object should
be cleaned up in unregister_object.
This commit is contained in:
Matthias Clasen 2020-11-09 14:38:55 -05:00
parent b966f593a5
commit 5379a4bf34

View File

@ -1387,6 +1387,8 @@ gtk_at_spi_context_unregister_object (GtkAtSpiContext *self)
self->registration_ids[self->n_registered_objects]); self->registration_ids[self->n_registered_objects]);
self->registration_ids[self->n_registered_objects] = 0; self->registration_ids[self->n_registered_objects] = 0;
} }
g_clear_pointer (&self->interfaces, g_variant_unref);
} }
/* }}} */ /* }}} */
/* {{{ GObject boilerplate */ /* {{{ GObject boilerplate */
@ -1399,7 +1401,6 @@ gtk_at_spi_context_finalize (GObject *gobject)
g_free (self->bus_address); g_free (self->bus_address);
g_free (self->context_path); g_free (self->context_path);
g_clear_pointer (&self->interfaces, g_variant_unref);
G_OBJECT_CLASS (gtk_at_spi_context_parent_class)->finalize (gobject); G_OBJECT_CLASS (gtk_at_spi_context_parent_class)->finalize (gobject);
} }