mirror of
https://github.com/systemd/systemd.git
synced 2024-10-31 07:51:21 +03:00
efi: never call qsort on potentially NULL arrays
This commit is contained in:
parent
b857193b1d
commit
62678deda2
Notes:
Lennart Poettering
2013-10-04 17:12:20 +02:00
Backport: bugfix
@ -384,7 +384,8 @@ int efi_get_boot_options(uint16_t **options) {
|
||||
list[count ++] = id;
|
||||
}
|
||||
|
||||
qsort(list, count, sizeof(uint16_t), cmp_uint16);
|
||||
if (list)
|
||||
qsort(list, count, sizeof(uint16_t), cmp_uint16);
|
||||
|
||||
*options = list;
|
||||
return count;
|
||||
|
Loading…
Reference in New Issue
Block a user