return 0;
}
-void routing_policy_rule_free(RoutingPolicyRule *rule) {
-
+RoutingPolicyRule *routing_policy_rule_free(RoutingPolicyRule *rule) {
if (!rule)
- return;
+ return NULL;
if (rule->network) {
LIST_REMOVE(rules, rule->network->rules, rule);
network_config_section_free(rule->section);
free(rule->iif);
free(rule->oif);
- free(rule);
+
+ return mfree(rule);
}
static int routing_policy_rule_copy(RoutingPolicyRule *dest, RoutingPolicyRule *src) {
};
int routing_policy_rule_new(RoutingPolicyRule **ret);
-void routing_policy_rule_free(RoutingPolicyRule *rule);
+RoutingPolicyRule *routing_policy_rule_free(RoutingPolicyRule *rule);
DEFINE_NETWORK_SECTION_FUNCTIONS(RoutingPolicyRule, routing_policy_rule_free);
int routing_policy_rule_section_verify(RoutingPolicyRule *rule);