mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-09-05 01:45:07 +03:00
efi: never call qsort on potentially NULL arrays
This commit is contained in:
@@ -384,6 +384,7 @@ int efi_get_boot_options(uint16_t **options) {
|
|||||||
list[count ++] = id;
|
list[count ++] = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (list)
|
||||||
qsort(list, count, sizeof(uint16_t), cmp_uint16);
|
qsort(list, count, sizeof(uint16_t), cmp_uint16);
|
||||||
|
|
||||||
*options = list;
|
*options = list;
|
||||||
|
Reference in New Issue
Block a user