1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-28 02:50:16 +03:00

network: add one more section validty check

Follow-up for 203d4df5732b1fdcf50db498ddeb74a934b21f87.
This commit is contained in:
Yu Watanabe 2019-09-19 15:20:00 +09:00
parent 9b6dddd170
commit 714a199e48

View File

@ -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);