X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Flogind.c;fp=src%2Flogind.c;h=28ba58bf5481bab8c29445c1ab957ab143cb4ed7;hp=94cb6cd80c70f73ae91e784c20f32117c142c444;hb=25d934917d3dd2ab10e8acc9a6bacd8c7f2f1067;hpb=ac2dcbb2155fa421b826cfd45ec98d4237b1c9fe diff --git a/src/logind.c b/src/logind.c index 94cb6cd80..28ba58bf5 100644 --- a/src/logind.c +++ b/src/logind.c @@ -56,7 +56,14 @@ Manager *manager_new(void) { m->cgroups = hashmap_new(string_hash_func, string_compare_func); m->fifo_fds = hashmap_new(trivial_hash_func, trivial_compare_func); - if (!m->devices || !m->seats || !m->sessions || !m->users) { + if (!m->devices || !m->seats || !m->sessions || !m->users || !m->cgroups || !m->fifo_fds) { + manager_free(m); + return NULL; + } + + m->reset_controllers = strv_new("cpu", NULL); + m->kill_exclude_users = strv_new("root", NULL); + if (!m->reset_controllers || !m->kill_exclude_users) { manager_free(m); return NULL; }