fd45e52 sets
n to NULL which leads to crash.
fixes: #5418
if (filename) {
address->section = n;
- hashmap_put(network->addresses_by_section, n, address);
+ n = NULL;
+
+ hashmap_put(network->addresses_by_section, address->section, address);
}
address->network = network;
*ret = address;
address = NULL;
- n = NULL;
return 0;
}
route->section = n;
n = NULL;
- r = hashmap_put(network->routes_by_section, n, route);
+ r = hashmap_put(network->routes_by_section, route->section, route);
if (r < 0)
return r;
}