while (u->sessions)
session_free(u->sessions);
+ if (u->cgroup_path)
+ hashmap_remove(u->manager->user_cgroups, u->cgroup_path);
free(u->cgroup_path);
free(u->service);
log_warning("Failed to create cgroup %s:%s: %s", *k, p, strerror(-r));
}
+ hashmap_put(u->manager->user_cgroups, u->cgroup_path, u);
+
return 0;
}
STRV_FOREACH(k, u->manager->controllers)
cg_trim(*k, u->cgroup_path, true);
+ hashmap_remove(u->manager->user_cgroups, u->cgroup_path);
+
free(u->cgroup_path);
u->cgroup_path = NULL;