From: Jan Janssen Date: Sat, 7 May 2022 09:15:33 +0000 (+0200) Subject: boot: Fix null pointer dereference X-Git-Tag: v251-rc3~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7ae43795c153916bc6a243e7be3249f07883701;p=thirdparty%2Fsystemd.git boot: Fix null pointer dereference --- diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c index 3e7cc74b175..fb08b99333b 100644 --- a/src/boot/efi/boot.c +++ b/src/boot/efi/boot.c @@ -1916,7 +1916,7 @@ static ConfigEntry *config_entry_add_loader( .device = device, .loader = xstrdup(loader), .id = xstrdup(id), - .sort_key = xstrdup(sort_key), + .sort_key = sort_key ? xstrdup(sort_key) : NULL, .key = key, .tries_done = UINTN_MAX, .tries_left = UINTN_MAX,