diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/sched/ematch.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sched/ematch.c b/net/sched/ematch.c index d421ec7..b29439d 100644 --- a/net/sched/ematch.c +++ b/net/sched/ematch.c @@ -409,14 +409,15 @@ void tcf_em_tree_destroy(struct tcf_proto *tp, struct tcf_ematch_tree *tree) if (em->ops) { if (em->ops->destroy) 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); } } tree->hdr.nmatches = 0; kfree(tree->matches); + tree->matches = NULL; } EXPORT_SYMBOL(tcf_em_tree_destroy); |