summaryrefslogtreecommitdiff
path: root/src/core/dbus-manager.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-11-21 21:36:04 +0100
committerLennart Poettering <lennart@poettering.net>2013-11-21 21:36:04 +0100
commit92b315dfb482626ca6c98b67cd862e4af483a499 (patch)
tree134176b3ca5ccba1ef5c29a12590b69dfbd44435 /src/core/dbus-manager.c
parent1302759d1581a4df0259cd4499a0908dad5f8b77 (diff)
core: actually make SwitchRoot() bus call do the deed
Diffstat (limited to 'src/core/dbus-manager.c')
-rw-r--r--src/core/dbus-manager.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
index 6002d02c5b..c560cac18f 100644
--- a/src/core/dbus-manager.c
+++ b/src/core/dbus-manager.c
@@ -1121,7 +1121,7 @@ static int method_switch_root(sd_bus *bus, sd_bus_message *message, void *userda
if (!isempty(init)) {
ri = strdup(init);
if (!ri) {
- free(ri);
+ free(rt);
return -ENOMEM;
}
}
@@ -1132,6 +1132,8 @@ static int method_switch_root(sd_bus *bus, sd_bus_message *message, void *userda
free(m->switch_root_init);
m->switch_root_init = ri;
+ m->exit_code = MANAGER_SWITCH_ROOT;
+
return sd_bus_reply_method_return(message, NULL);
}