mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-08 20:58:20 +03:00
bootctl: Fix NULL pointer dereference
Fixes: #25952 (cherry picked from commit 6e689dc6eedea558df3d98da4477d58432d2d29c)
This commit is contained in:
parent
a0532ffd2f
commit
295bb34f9a
@ -740,9 +740,11 @@ static int boot_entry_load_unified(
|
||||
if (!tmp.title)
|
||||
return log_oom();
|
||||
|
||||
tmp.sort_key = strdup(good_sort_key);
|
||||
if (!tmp.sort_key)
|
||||
return log_oom();
|
||||
if (good_sort_key) {
|
||||
tmp.sort_key = strdup(good_sort_key);
|
||||
if (!tmp.sort_key)
|
||||
return log_oom();
|
||||
}
|
||||
|
||||
if (good_version) {
|
||||
tmp.version = strdup(good_version);
|
||||
|
Loading…
x
Reference in New Issue
Block a user