efi: never call qsort on potentially NULL arrays

This commit is contained in:
Lennart Poettering
2013-10-02 19:45:12 +02:00
parent b857193b1d
commit 62678deda2
+1
View File
@@ -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;