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:
parent
16f4efb415
commit
8e050193e1
@ -1379,7 +1379,7 @@ static struct node *bus_node_allocate(sd_bus *bus, const char *path) {
|
|||||||
n->path = s;
|
n->path = s;
|
||||||
s = NULL; /* do not free */
|
s = NULL; /* do not free */
|
||||||
|
|
||||||
r = hashmap_put(bus->nodes, s, n);
|
r = hashmap_put(bus->nodes, n->path, n);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
free(n->path);
|
free(n->path);
|
||||||
free(n);
|
free(n);
|
||||||
|
Loading…
Reference in New Issue
Block a user