[systemd-commits] src/network
Tom Gundersen
tomegun at kemper.freedesktop.org
Tue Aug 19 06:54:58 PDT 2014
src/network/networkd-network.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 2c36be2f4ba38f9097cdcdcd1e724ffa46da12c7
Author: Tom Gundersen <teg at jklm.no>
Date: Tue Aug 19 15:41:23 2014 +0200
networkd: fix use-after-free
Elements must be removed from the hashtable before they are freed.
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index 803fcdd..fc62395 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -172,8 +172,10 @@ void network_free(Network *network) {
netdev_unref(network->bond);
- HASHMAP_FOREACH(netdev, network->stacked_netdevs, i)
+ HASHMAP_FOREACH(netdev, network->stacked_netdevs, i) {
+ hashmap_remove(network->stacked_netdevs, netdev->ifname);
netdev_unref(netdev);
+ }
hashmap_free(network->stacked_netdevs);
while ((route = network->static_routes))
More information about the systemd-commits
mailing list