Commit 4ab9f056 authored by Christian Kellner's avatar Christian Kellner
Browse files

test/mock: remove force power in finalize

If the force power device has not yet been removed, do so in the
'finalize' method of the MockSysfs object. Move the un-ref'ing of
the umockdev TestBed down so it happens after the hash tables
are destroyed.
parent dfbcf877
......@@ -144,10 +144,14 @@ mock_sysfs_finalize (GObject *object)
MockSysfs *ms = MOCK_SYSFS (object);
g_clear_object (&ms->bed);
if (ms->force_power)
mock_sysfs_force_power_remove (ms);
g_clear_pointer (&ms->domains, g_hash_table_unref);
g_clear_pointer (&ms->devices, g_hash_table_unref);
g_clear_object (&ms->bed);
G_OBJECT_CLASS (mock_sysfs_parent_class)->finalize (object);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment