aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/sched/ematch.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sched/ematch.c b/net/sched/ematch.c
index d421ec728ee7..b29439ddcf71 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)
409 if (em->ops) { 409 if (em->ops) {
410 if (em->ops->destroy) 410 if (em->ops->destroy)
411 em->ops->destroy(tp, em); 411 em->ops->destroy(tp, em);
412 else if (!tcf_em_is_simple(em) && em->data) 412 else if (!tcf_em_is_simple(em))
413 kfree((void *) em->data); 413 kfree(em->data);
414 module_put(em->ops->owner); 414 module_put(em->ops->owner);
415 } 415 }
416 } 416 }
417 417
418 tree->hdr.nmatches = 0; 418 tree->hdr.nmatches = 0;
419 kfree(tree->matches); 419 kfree(tree->matches);
420 tree->matches = NULL;
420} 421}
421EXPORT_SYMBOL(tcf_em_tree_destroy); 422EXPORT_SYMBOL(tcf_em_tree_destroy);
422 423