From: Yu Watanabe Date: Sun, 11 Aug 2019 15:05:28 +0000 (+0900) Subject: bootctl: arg_dolloar_boot_path() may return NULL X-Git-Tag: v243-rc2~47^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f8a2b09a1890d7de5ea82b1cf51608afa4fe5de7;p=thirdparty%2Fsystemd.git bootctl: arg_dolloar_boot_path() may return NULL --- diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c index d0bea6a9467..ddc267401f5 100644 --- a/src/boot/bootctl.c +++ b/src/boot/bootctl.c @@ -1176,7 +1176,11 @@ static int verb_status(int argc, char *argv[], void *userdata) { if (r < 0) return r; - puts(arg_dollar_boot_path()); + const char *path = arg_dollar_boot_path(); + if (!path) + return log_error_errno(SYNTHETIC_ERRNO(EACCES), "Failed to determine XBOOTLDR location: %m"); + + puts(path); } if (arg_print_esp_path || arg_print_dollar_boot_path)