chiark / gitweb /
logind: properly clean up user cgroups when they run empty
[elogind.git] / src / login / logind-session.c
index 5c8d549316045eb15d5d8a92a299bf20f326ca51..58514ea0d2ccae3f1a8e2d8b6dafb13acfdab082 100644 (file)
@@ -88,7 +88,7 @@ void session_free(Session *s) {
         }
 
         if (s->cgroup_path)
         }
 
         if (s->cgroup_path)
-                hashmap_remove(s->manager->cgroups, s->cgroup_path);
+                hashmap_remove(s->manager->session_cgroups, s->cgroup_path);
 
         free(s->cgroup_path);
         strv_free(s->controllers);
 
         free(s->cgroup_path);
         strv_free(s->controllers);
@@ -527,7 +527,7 @@ static int session_create_cgroup(Session *s) {
                 }
         }
 
                 }
         }
 
-        hashmap_put(s->manager->cgroups, s->cgroup_path, s);
+        hashmap_put(s->manager->session_cgroups, s->cgroup_path, s);
 
         return 0;
 }
 
         return 0;
 }
@@ -646,7 +646,7 @@ static int session_terminate_cgroup(Session *s) {
         STRV_FOREACH(k, s->user->manager->controllers)
                 cg_trim(*k, s->cgroup_path, true);
 
         STRV_FOREACH(k, s->user->manager->controllers)
                 cg_trim(*k, s->cgroup_path, true);
 
-        hashmap_remove(s->manager->cgroups, s->cgroup_path);
+        hashmap_remove(s->manager->session_cgroups, s->cgroup_path);
 
         free(s->cgroup_path);
         s->cgroup_path = NULL;
 
         free(s->cgroup_path);
         s->cgroup_path = NULL;