diff options
author | David Tardon <dtardon@redhat.com> | 2022-11-30 16:46:05 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2022-12-14 09:57:35 +0100 |
commit | 359e8d76e8addf1d88aa8f8b07a9b09817efbdb6 (patch) | |
tree | e3799ef7dc6437e2b8370f7186581d2b613d2b56 /src/machine/machined.c | |
parent | 38f514409ac2f98b04a15c6e47a659a43618bd3b (diff) | |
download | systemd-359e8d76e8addf1d88aa8f8b07a9b09817efbdb6.tar.gz |
machine: propagate error from machine_new
Diffstat (limited to 'src/machine/machined.c')
-rw-r--r-- | src/machine/machined.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/machine/machined.c b/src/machine/machined.c index 9ecba8720f..b4ff97ab70 100644 --- a/src/machine/machined.c +++ b/src/machine/machined.c @@ -117,9 +117,9 @@ static int manager_add_host_machine(Manager *m) { if (!unit) return log_oom(); - t = machine_new(m, MACHINE_HOST, ".host"); - if (!t) - return log_oom(); + r = machine_new(m, MACHINE_HOST, ".host", &t); + if (r < 0) + return log_error_errno(r, "Failed to create machine: %m"); t->leader = 1; t->id = mid; |