summaryrefslogtreecommitdiff
path: root/src/machine/machine-dbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/machine/machine-dbus.c')
-rw-r--r--src/machine/machine-dbus.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
index 150a3f776..ddd6b4b10 100644
--- a/src/machine/machine-dbus.c
+++ b/src/machine/machine-dbus.c
@@ -210,13 +210,13 @@ int machine_send_create_reply(Machine *m, sd_bus_error *error) {
c = m->create_message;
m->create_message = NULL;
+ if (error)
+ return sd_bus_reply_method_error(m->manager->bus, c, error);
+
/* Update the machine state file before we notify the client
* about the result. */
machine_save(m);
- if (error)
- return sd_bus_reply_method_error(m->manager->bus, c, error);
-
p = machine_bus_path(m);
if (!p)
return -ENOMEM;