]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: fix use after free()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 17 Jul 2019 01:21:07 +0000 (10:21 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 17 Jul 2019 14:13:40 +0000 (23:13 +0900)
The hashmap will be accessed by client_stop().

src/network/networkd-manager.c

index 51cc8f654bb20ce4eb4828122bad1eab3a5dc1c1..6037e8564fd65b8971f505f5a34c8b1db010cb08 100644 (file)
@@ -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)