mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-03 01:17:45 +03:00
bootctl: Fix NULL pointer dereference
Fixes: #25952 (cherry picked from commit6e689dc6ee
) (cherry picked from commit295bb34f9a
)
This commit is contained in:
parent
640acfb459
commit
b33fbceef9
@ -526,9 +526,11 @@ static int boot_entry_load_unified(
|
|||||||
if (!tmp.title)
|
if (!tmp.title)
|
||||||
return log_oom();
|
return log_oom();
|
||||||
|
|
||||||
tmp.sort_key = strdup(good_sort_key);
|
if (good_sort_key) {
|
||||||
if (!tmp.sort_key)
|
tmp.sort_key = strdup(good_sort_key);
|
||||||
return log_oom();
|
if (!tmp.sort_key)
|
||||||
|
return log_oom();
|
||||||
|
}
|
||||||
|
|
||||||
tmp.version = strdup(good_version);
|
tmp.version = strdup(good_version);
|
||||||
if (!tmp.version)
|
if (!tmp.version)
|
||||||
|
Loading…
Reference in New Issue
Block a user