From: Yu Watanabe Date: Thu, 19 Sep 2019 06:20:00 +0000 (+0900) Subject: network: add one more section validty check X-Git-Tag: v244-rc1~268^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13610%2Fhead;p=thirdparty%2Fsystemd.git network: add one more section validty check Follow-up for 203d4df5732b1fdcf50db498ddeb74a934b21f87. --- diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index d1c4cddeb19..a2cd7f4c602 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);