chiark / gitweb /
Do not realloc strings, which are already in the hashmap as keys
[elogind.git] / src / core / unit.c
index 27119b0cd72880797ed770d762b6dc30dc827c36..ab313b9b91b6faa4e8bfdd53a82c9c3e331d2e23 100644 (file)
@@ -2329,7 +2329,7 @@ int unit_deserialize(Unit *u, FILE *f, FDSet *fds) {
                         free(u->cgroup_path);
                         u->cgroup_path = s;
 
-                        hashmap_put(u->manager->cgroup_unit, s, u);
+                        assert(hashmap_put(u->manager->cgroup_unit, s, u) == 1);
                         continue;
                 }