diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-12-29 19:17:35 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-12-29 19:17:42 +0100 |
commit | 57fe5a42f0975ca12ff856ca221c081a1ad3e87e (patch) | |
tree | 9c2468641b30e7a3d398c44d7e58ebbd45831ed8 /src/network/networkd-routing-policy-rule.c | |
parent | network: fix possible memory leak (diff) | |
download | systemd-57fe5a42f0975ca12ff856ca221c081a1ad3e87e.tar.xz systemd-57fe5a42f0975ca12ff856ca221c081a1ad3e87e.zip |
network: drop unnecessary checks
By the previous commit, the checks are not necessary any more.
Diffstat (limited to 'src/network/networkd-routing-policy-rule.c')
-rw-r--r-- | src/network/networkd-routing-policy-rule.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/network/networkd-routing-policy-rule.c b/src/network/networkd-routing-policy-rule.c index 723a44cb6d..dd155caefb 100644 --- a/src/network/networkd-routing-policy-rule.c +++ b/src/network/networkd-routing-policy-rule.c @@ -39,10 +39,8 @@ RoutingPolicyRule *routing_policy_rule_free(RoutingPolicyRule *rule) { } if (rule->manager) { - if (set_get(rule->manager->rules, rule) == rule) - set_remove(rule->manager->rules, rule); - if (set_get(rule->manager->rules_foreign, rule) == rule) - set_remove(rule->manager->rules_foreign, rule); + set_remove(rule->manager->rules, rule); + set_remove(rule->manager->rules_foreign, rule); } network_config_section_free(rule->section); |