mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-07 08:39:48 +00:00
trivial: Fix a possible critical warning when parsing invalid metadata
This commit is contained in:
parent
1985b706b9
commit
d56ad5b440
@ -2543,7 +2543,14 @@ fu_engine_get_releases_for_device (FuEngine *self, FuDevice *device, GError **er
|
|||||||
|
|
||||||
/* return the compound error */
|
/* return the compound error */
|
||||||
if (releases->len == 0) {
|
if (releases->len == 0) {
|
||||||
g_propagate_error (error, g_steal_pointer (&error_all));
|
if (error_all != NULL) {
|
||||||
|
g_propagate_error (error, g_steal_pointer (&error_all));
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
g_set_error (error,
|
||||||
|
FWUPD_ERROR,
|
||||||
|
FWUPD_ERROR_NOTHING_TO_DO,
|
||||||
|
"No valid releases found for device");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return releases;
|
return releases;
|
||||||
|
Loading…
Reference in New Issue
Block a user