return NULL;
}
- if (asprintf(&u->state_file, "/run/systemd/user/%lu", (unsigned long) uid) < 0) {
+ if (asprintf(&u->state_file, "/run/systemd/users/%lu", (unsigned long) uid) < 0) {
free(u->name);
free(u);
return NULL;
assert(u);
assert(u->state_file);
- r = safe_mkdir("/run/systemd/user", 0755, 0, 0);
+ r = safe_mkdir("/run/systemd/users", 0755, 0, 0);
if (r < 0)
goto finish;
int user_load(User *u) {
int r;
char *display = NULL;
- Session *s;
+ Session *s = NULL;
assert(u);
return r;
}
- s = hashmap_get(u->manager->sessions, display);
- free(display);
+ if (display) {
+ s = hashmap_get(u->manager->sessions, display);
+ free(display);
+ }
if (s && s->display && x11_display_is_local(s->display))
u->display = s;