mirror of
https://github.com/systemd/systemd.git
synced 2025-03-14 04:58:28 +03:00
core: Forgot to dereference pointer when checking for NULL
Actually we already checked for !rt before, now we'd like to examine the return value of the memory allocation.
This commit is contained in:
parent
3cf148f307
commit
f146f5e159
@ -2282,7 +2282,7 @@ static int exec_runtime_allocate(ExecRuntime **rt) {
|
||||
return 0;
|
||||
|
||||
*rt = new0(ExecRuntime, 1);
|
||||
if (!rt)
|
||||
if (!*rt)
|
||||
return -ENOMEM;
|
||||
|
||||
(*rt)->n_ref = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user