[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHsH6GvP6GOw_haCHmw-ok89u7DcbsijaAK-1Qn103uSB9ETvQ@mail.gmail.com>
Date: Tue, 16 Jan 2018 20:17:11 +0200
From: Eyal Birger <eyal.birger@...il.com>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>,
Pablo Neira Ayuso <pablo@...filter.org>,
Jamal Hadi Salim <jhs@...atatu.com>, coreteam@...filter.org,
shmulik@...anetworks.com, Eyal Birger <eyal@...anetworks.com>
Subject: Re: [PATCH net-next 2/2] net: sched: add xfrm policy ematch
On Tue, Jan 16, 2018 at 8:30 AM, Cong Wang <xiyou.wangcong@...il.com> wrote:
> On Fri, Jan 12, 2018 at 4:57 AM, Eyal Birger <eyal.birger@...il.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.
Powered by blists - more mailing lists