Commit 7ed76613 authored by Christian Kellner's avatar Christian Kellner
Browse files

test/mock: plug small leaks

Free the `idstr` for the MockDevice, free the `dmi` path variable
for the dmi device path and also free the return value from
parent 8cd109b3
......@@ -58,6 +58,7 @@ mock_device_destroy (gpointer data)
g_clear_pointer (&device->devices, g_hash_table_unref);
g_free (device->path);
g_free (device->idstr);
g_free (device);
......@@ -548,7 +549,7 @@ mock_sysfs_dmi_id_remove (MockSysfs *ms)
umockdev_testbed_uevent (ms->bed, ms->dmi, "remove");
umockdev_testbed_remove_device (ms->bed, ms->dmi);
ms->dmi = NULL;
g_clear_pointer (&ms->dmi, g_free);
return TRUE;
......@@ -1041,7 +1042,7 @@ mock_sysfs_set_osrelease (MockSysfs *ms,
g_autoptr(GFile) target = NULL;
g_autofree char *data = NULL;
g_autofree char *path = NULL;
const char *root;
g_autofree char *root = NULL;
gboolean ok;
gsize n;
int r;
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