mirror of
https://github.com/systemd/systemd.git
synced 2025-03-31 14:50:15 +03:00
swap: check p->what for NULL
Commit 61f9cf4e4c introduced swap_get_parameters(s) but only checked its return for NULL and not its ->what. Fixes https://github.com/systemd/systemd/issues/15070
This commit is contained in:
parent
992622c428
commit
d4a3494e65
@ -207,7 +207,7 @@ static int swap_add_device_dependencies(Swap *s) {
|
||||
return 0;
|
||||
|
||||
p = swap_get_parameters(s);
|
||||
if (!p)
|
||||
if (!p || !p->what)
|
||||
return 0;
|
||||
|
||||
mask = s->from_proc_swaps ? UNIT_DEPENDENCY_PROC_SWAP : UNIT_DEPENDENCY_FILE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user