From ccd5fd0088ad0fb81adf9fd40330e2bdcf4d3882 Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Mon, 24 Sep 2018 14:06:56 -0500 Subject: [PATCH] trivial: device-list: Correct a minor logic error If one of the child devices has gone away, this potentially will cause the daemon to segfault while accessing it. --- src/fu-device-list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fu-device-list.c b/src/fu-device-list.c index 418942a17..b81399571 100644 --- a/src/fu-device-list.c +++ b/src/fu-device-list.c @@ -386,7 +386,7 @@ fu_device_list_remove (FuDeviceList *self, FuDevice *device) FuDeviceItem *child_item = fu_device_list_find_by_id (self, fu_device_get_id (child), NULL); - if (item == NULL) { + if (child_item == NULL) { g_debug ("device %s not found", fu_device_get_id (child)); continue; }