1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-15 07:24:00 +03:00

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

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);