X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=manager.c;h=88dc64bb655771d56055fa8bf50d29d59b046c15;hb=30de7d8520d1dfaa8c46098f972f57961fc91923;hp=a4696d6e99f7c4c9efa075f36cbe2fe1cccf5c97;hpb=1137a57c2677936bab56c26591a42c93a5e670a8;p=elogind.git diff --git a/manager.c b/manager.c index a4696d6e9..88dc64bb6 100644 --- a/manager.c +++ b/manager.c @@ -149,12 +149,12 @@ static char** session_dirs(void) { } if ((e = getenv("XDG_CONFIG_DIRS"))) - config_dirs = strv_split(e, ":"); - else - config_dirs = strv_new("/etc/xdg", NULL); + if (!(config_dirs = strv_split(e, ":"))) + goto fail; - if (!config_dirs) - goto fail; + /* We don't treat /etc/xdg/systemd here as the spec + * suggests because we assume that that is a link to + * /etc/systemd/ anyway. */ if ((e = getenv("XDG_DATA_HOME"))) { if (asprintf(&data_home, "%s/systemd/session", e) < 0) @@ -254,7 +254,7 @@ static int manager_find_paths(Manager *m) { } if (m->running_as == MANAGER_INIT) { - /* /etc/init.d/ compativility does not matter to users */ + /* /etc/init.d/ compatibility does not matter to users */ if ((e = getenv("SYSTEMD_SYSVINIT_PATH"))) if (!(m->sysvinit_path = split_path_and_make_absolute(e))) @@ -521,6 +521,7 @@ void manager_free(Manager *m) { assert(m); + manager_dispatch_cleanup_queue(m); manager_clear_jobs_and_units(m); for (c = 0; c < _UNIT_TYPE_MAX; c++)