logind: fail user creation is slice creation fails

If the slice wasn't set, logind would core dump later in the process:
systemd-logind[2672]: Assertion 's->user->slice' failed at ../src/login/logind-session.c:531, function session_start_scope().

https://bugzilla.redhat.com/show_bug.cgi?id=1182781
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2015-01-27 12:29:32 -05:00
parent 75a17dd008
commit 941652e920
+1
View File
@@ -351,6 +351,7 @@ static int user_start_slice(User *u) {
dbus_error_free(&error);
free(slice);
return r;
} else {
u->slice = slice;