diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-09-19 15:20:00 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-09-21 20:17:15 +0900 |
commit | 714a199e481c294b9986b7d5160a89a65d8b375a (patch) | |
tree | 10a0dac28f1e38ae45534da8b0a08ed340ebe50d /src | |
parent | 9b6dddd1701aae48346b61a6febf7e95e42a5d32 (diff) | |
download | systemd-714a199e481c294b9986b7d5160a89a65d8b375a.tar.gz |
network: add one more section validty check
Follow-up for 203d4df5732b1fdcf50db498ddeb74a934b21f87.
Diffstat (limited to 'src')
-rw-r--r-- | src/network/networkd-network.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index d1c4cddeb1..a2cd7f4c60 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -300,6 +300,10 @@ int network_verify(Network *network) { if (section_is_invalid(prefix->section)) prefix_free(prefix); + LIST_FOREACH_SAFE(prefixes, prefix, prefix_next, network->static_route_prefixes) + if (section_is_invalid(prefix->section)) + prefix_free(prefix); + LIST_FOREACH_SAFE(rules, rule, rule_next, network->rules) if (routing_policy_rule_section_verify(rule) < 0) routing_policy_rule_free(rule); |