git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
[pandora-kernel.git]
/
net
/
sched
/
ematch.c
diff --git
a/net/sched/ematch.c
b/net/sched/ematch.c
index
74ff918
..
e82519e
100644
(file)
--- a/
net/sched/ematch.c
+++ b/
net/sched/ematch.c
@@
-224,7
+224,7
@@
static int tcf_em_validate(struct tcf_proto *tp,
if (em->ops == NULL) {
err = -ENOENT;
if (em->ops == NULL) {
err = -ENOENT;
-#ifdef CONFIG_
KMOD
+#ifdef CONFIG_
MODULES
__rtnl_unlock();
request_module("ematch-kind-%u", em_hdr->kind);
rtnl_lock();
__rtnl_unlock();
request_module("ematch-kind-%u", em_hdr->kind);
rtnl_lock();
@@
-312,10
+312,9
@@
int tcf_em_tree_validate(struct tcf_proto *tp, struct nlattr *nla,
struct tcf_ematch_tree_hdr *tree_hdr;
struct tcf_ematch *em;
struct tcf_ematch_tree_hdr *tree_hdr;
struct tcf_ematch *em;
- if (!nla) {
- memset(tree, 0, sizeof(*tree));
+ memset(tree, 0, sizeof(*tree));
+ if (!nla)
return 0;
return 0;
- }
err = nla_parse_nested(tb, TCA_EMATCH_TREE_MAX, nla, em_policy);
if (err < 0)
err = nla_parse_nested(tb, TCA_EMATCH_TREE_MAX, nla, em_policy);
if (err < 0)
@@
-410,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);
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);
}
kfree((void *) em->data);
module_put(em->ops->owner);
}
@@
-418,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->hdr.nmatches = 0;
kfree(tree->matches);
+ tree->matches = NULL;
}
EXPORT_SYMBOL(tcf_em_tree_destroy);
}
EXPORT_SYMBOL(tcf_em_tree_destroy);