bootspec: add missing else
Otherwise, OOM error will never checked, and the "preferred" setting
always emits warning that the field is unknown.
Follow-up for 450e0dce02.
Fixes CID#1645063.
This commit is contained in:
@@ -519,7 +519,7 @@ int boot_loader_read_conf(BootConfig *config, FILE *file, const char *path) {
|
||||
|
||||
if (streq(field, "preferred"))
|
||||
r = free_and_strdup(&config->preferred_pattern, p);
|
||||
if (streq(field, "default"))
|
||||
else if (streq(field, "default"))
|
||||
r = free_and_strdup(&config->default_pattern, p);
|
||||
else if (STR_IN_SET(field, "timeout", "editor", "auto-entries", "auto-firmware",
|
||||
"auto-poweroff", "auto-reboot", "beep", "reboot-for-bitlocker",
|
||||
|
||||
Reference in New Issue
Block a user