|
@@ -409,14 +409,15 @@ void tcf_em_tree_destroy(struct tcf_proto *tp, struct tcf_ematch_tree *tree)
|
|
if (em->ops) {
|
|
if (em->ops) {
|
|
if (em->ops->destroy)
|
|
if (em->ops->destroy)
|
|
em->ops->destroy(tp, em);
|
|
em->ops->destroy(tp, em);
|
|
- else if (!tcf_em_is_simple(em) && em->data)
|
|
|
|
- kfree((void *) em->data);
|
|
|
|
|
|
+ else if (!tcf_em_is_simple(em))
|
|
|
|
+ kfree(em->data);
|
|
module_put(em->ops->owner);
|
|
module_put(em->ops->owner);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
tree->hdr.nmatches = 0;
|
|
tree->hdr.nmatches = 0;
|
|
kfree(tree->matches);
|
|
kfree(tree->matches);
|
|
|
|
+ tree->matches = NULL;
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(tcf_em_tree_destroy);
|
|
EXPORT_SYMBOL(tcf_em_tree_destroy);
|
|
|
|
|