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:
Yu Watanabe
2026-02-18 06:37:44 +01:00
committed by Mike Yuan
parent cad60201fc
commit 43c4ecc951
+1 -1
View File
@@ -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",