|
@@ -80,9 +80,12 @@ static void ipt_destroy_target(struct xt_entry_target *t)
|
|
static void tcf_ipt_release(struct tc_action *a)
|
|
static void tcf_ipt_release(struct tc_action *a)
|
|
{
|
|
{
|
|
struct tcf_ipt *ipt = to_ipt(a);
|
|
struct tcf_ipt *ipt = to_ipt(a);
|
|
- ipt_destroy_target(ipt->tcfi_t);
|
|
|
|
|
|
+
|
|
|
|
+ if (ipt->tcfi_t) {
|
|
|
|
+ ipt_destroy_target(ipt->tcfi_t);
|
|
|
|
+ kfree(ipt->tcfi_t);
|
|
|
|
+ }
|
|
kfree(ipt->tcfi_tname);
|
|
kfree(ipt->tcfi_tname);
|
|
- kfree(ipt->tcfi_t);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
static const struct nla_policy ipt_policy[TCA_IPT_MAX + 1] = {
|
|
static const struct nla_policy ipt_policy[TCA_IPT_MAX + 1] = {
|
|
@@ -187,7 +190,7 @@ err2:
|
|
kfree(tname);
|
|
kfree(tname);
|
|
err1:
|
|
err1:
|
|
if (ret == ACT_P_CREATED)
|
|
if (ret == ACT_P_CREATED)
|
|
- tcf_idr_cleanup(*a, est);
|
|
|
|
|
|
+ tcf_idr_release(*a, bind);
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|