]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sched/ematch.c
block: send disk "change" event for rescan_partitions()
[linux-2.6-omap-h63xx.git] / net / sched / ematch.c
index d421ec728ee7e795b3ddb3795859242dd5fa5b2b..5e6f82e0e6f3ca7c092e3a1628d69b416604d0f5 100644 (file)
@@ -409,7 +409,7 @@ 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)
+                       else if (!tcf_em_is_simple(em))
                                kfree((void *) em->data);
                        module_put(em->ops->owner);
                }
@@ -417,6 +417,7 @@ void tcf_em_tree_destroy(struct tcf_proto *tp, struct tcf_ematch_tree *tree)
 
        tree->hdr.nmatches = 0;
        kfree(tree->matches);
+       tree->matches = NULL;
 }
 EXPORT_SYMBOL(tcf_em_tree_destroy);