mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-18 06:03:42 +03:00
bootctl: Fix NULL pointer dereference
Fixes: #25952 (cherry picked from commit 6e689dc6eedea558df3d98da4477d58432d2d29c) (cherry picked from commit 295bb34f9af96cf14e482371695fe61042046a2e)
This commit is contained in:
parent
640acfb459
commit
b33fbceef9
@ -526,9 +526,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();
|
||||
}
|
||||
|
||||
tmp.version = strdup(good_version);
|
||||
if (!tmp.version)
|
||||
|
Loading…
x
Reference in New Issue
Block a user