summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-07-17 03:21:07 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-07-17 16:13:40 +0200
commit26a65470bafddce12103b4702623a74829501777 (patch)
treec12b0b9a61e37233db87c944549ca858464a1461
parentnetwork: drop unnecessary line breaks (diff)
downloadsystemd-26a65470bafddce12103b4702623a74829501777.tar.xz
systemd-26a65470bafddce12103b4702623a74829501777.zip
network: fix use after free()
The hashmap will be accessed by client_stop().
-rw-r--r--src/network/networkd-manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index 51cc8f654b..6037e8564f 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -1395,7 +1395,7 @@ void manager_free(Manager *m) {
while ((a = hashmap_first_key(m->dhcp6_prefixes)))
(void) dhcp6_prefix_remove(m, a);
- hashmap_free(m->dhcp6_prefixes);
+ m->dhcp6_prefixes = hashmap_free(m->dhcp6_prefixes);
while ((link = hashmap_steal_first(m->links))) {
if (link->dhcp6_client)