Commit 1eeff2c0 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

fwupd: Properly scope error variable

Otherwise it complains nasty
parent a680abd3
......@@ -191,7 +191,6 @@ void FwupdBackend::populate()
void FwupdBackend::addUpdates()
{
g_autoptr(GError) error = nullptr;
g_autoptr(GError) error2 = nullptr;
g_autoptr(GPtrArray) devices = fwupd_client_get_devices(client, nullptr, &error);
if (!devices)
......@@ -224,7 +223,7 @@ void FwupdBackend::addUpdates()
if (!fwupd_device_has_flag(device, FWUPD_DEVICE_FLAG_UPDATABLE))
continue;
g_autoptr(GError) error2 = nullptr;
g_autoptr(GPtrArray) rels = fwupd_client_get_upgrades(client, fwupd_device_get_id(device), nullptr, &error2);
if (rels) {
fwupd_device_add_release(device, (FwupdRelease *)g_ptr_array_index(rels, 0));
......
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