summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/journalctl.xml2
-rw-r--r--src/network/networkd-address.c7
-rw-r--r--src/network/networkd-route.c2
3 files changed, 7 insertions, 4 deletions
diff --git a/man/journalctl.xml b/man/journalctl.xml
index 75bbc10215..cae5312db2 100644
--- a/man/journalctl.xml
+++ b/man/journalctl.xml
@@ -677,7 +677,7 @@
a new 128-bit ID suitable for identifying messages. This is
intended for usage by developers who need a new identifier for
a new message they introduce and want to make
- recognizable. This will print the new ID in three different
+ recognizable. This will print the new ID in four different
formats which can be copied into source code or similar.
</para></listitem>
</varlistentry>
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index 9d0311d76f..e34793e50b 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -85,7 +85,11 @@ int address_new_static(Network *network, const char *filename, unsigned section_
if (filename) {
address->section = n;
- hashmap_put(network->addresses_by_section, n, address);
+ n = NULL;
+
+ r = hashmap_put(network->addresses_by_section, address->section, address);
+ if (r < 0)
+ return r;
}
address->network = network;
@@ -94,7 +98,6 @@ int address_new_static(Network *network, const char *filename, unsigned section_
*ret = address;
address = NULL;
- n = NULL;
return 0;
}
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
index a8ba293ae8..570083f180 100644
--- a/src/network/networkd-route.c
+++ b/src/network/networkd-route.c
@@ -113,7 +113,7 @@ int route_new_static(Network *network, const char *filename, unsigned section_li
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;
}