On Tue, Jan 16, 2018 at 8:30 AM, Cong Wang <xiyou.wangc...@gmail.com> wrote:
> On Fri, Jan 12, 2018 at 4:57 AM, Eyal Birger <eyal.bir...@gmail.com> wrote:
>> +static void em_policy_destroy(struct tcf_ematch *em)
>> +{
>> +       const struct xt_policy_info *info = (const void *)em->data;
>> +
>> +       if (!info)
>> +               return;
>> +
>> +       kfree((void *)em->data);
>> +}
>
> Nit: kfree() could handle NULL, no need to check.

Thanks Cong! I later realized I could use the default ematch destructor,
so this function could be removed entirely. However, as I plan to resubmit this
as a more generic ematch without a direct netfilter dependency, this
code will change significantly.

Thanks again,
Eyal.

Reply via email to