From: Yu Watanabe Date: Wed, 12 Mar 2025 17:00:25 +0000 (+0900) Subject: boot: fix use of uninitialized value on error X-Git-Tag: v258-rc1~1097^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c5710c00ff98389cc9984d544204976979e036fc;p=thirdparty%2Fsystemd.git boot: fix use of uninitialized value on error Follow-up for 0bdf94e588c8d781a91e5738525d673c0966a510. --- diff --git a/src/boot/boot.c b/src/boot/boot.c index af7ab4e7937..400e5ab5207 100644 --- a/src/boot/boot.c +++ b/src/boot/boot.c @@ -1083,8 +1083,8 @@ static void config_defaults_load_from_file(Config *config, char *content) { bool reboot_yes_no; if (!parse_boolean(value, &reboot_yes_no)) log_error("Error parsing 'reboot-on-error' config option, ignoring: %s", value); - - config->reboot_on_error = reboot_yes_no ? REBOOT_YES : REBOOT_NO; + else + config->reboot_on_error = reboot_yes_no ? REBOOT_YES : REBOOT_NO; } } else if (streq8(key, "secure-boot-enroll")) {