projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ade014
)
network: free routes assigned to link
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Wed, 18 Jul 2018 04:07:27 +0000
(13:07 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Wed, 18 Jul 2018 04:07:27 +0000
(13:07 +0900)
src/network/networkd-link.c
patch
|
blob
|
history
diff --git
a/src/network/networkd-link.c
b/src/network/networkd-link.c
index
db92ef1
..
c603f42
100644
(file)
--- a/
src/network/networkd-link.c
+++ b/
src/network/networkd-link.c
@@
-492,11
+492,21
@@
static int link_new(Manager *manager, sd_netlink_message *message, Link **ret) {
static void link_free(Link *link) {
Address *address;
Link *carrier;
+ Route *route;
Iterator i;
if (!link)
return;
+ while ((route = set_first(link->routes)))
+ route_free(route);
+
+ while ((route = set_first(link->routes_foreign)))
+ route_free(route);
+
+ link->routes = set_free(link->routes);
+ link->routes_foreign = set_free(link->routes_foreign);
+
while ((address = set_first(link->addresses)))
address_free(address);