chiark / gitweb /
Fix segv introduced by 2fd069b18e525860514a70d3ea08410ca122d3e2
[elogind.git] / src / libsystemd-bus / bus-objects.c
index 5aa83a44262c4952156b1c254b3e13dde5e20a06..54ed7542d27473dce8222e4af3191d390a5fd151 100644 (file)
@@ -1379,7 +1379,7 @@ static struct node *bus_node_allocate(sd_bus *bus, const char *path) {
         n->path = s;
         s = NULL; /* do not free */
 
-        r = hashmap_put(bus->nodes, s, n);
+        r = hashmap_put(bus->nodes, n->path, n);
         if (r < 0) {
                 free(n->path);
                 free(n);