Fix segv introduced by 2fd069b18e

n->path is pointing to the value now, we set s = NULL above.
This commit is contained in:
Colin Walters
2013-12-15 20:23:23 -05:00
parent 16f4efb415
commit 8e050193e1
+1 -1
View 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);