On Tue, Jan 16, 2018 at 8:30 AM, Cong Wang [off-list ref] wrote:
On Fri, Jan 12, 2018 at 4:57 AM, Eyal Birger [off-list ref] wrote:
quoted
+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.