X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fsched%2Fematch.c;h=5cb956b721e8e05a452262decdc114061cb0a0a0;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=ebfe2e7d21bdff98494baf479c2cca37c4175b99;hpb=cee37fe97739d85991964371c1f3a745c00dd236;p=linux-2.6.git diff --git a/net/sched/ematch.c b/net/sched/ematch.c index ebfe2e7d2..5cb956b72 100644 --- a/net/sched/ematch.c +++ b/net/sched/ematch.c @@ -92,7 +92,6 @@ #include #include #include -#include static LIST_HEAD(ematch_ops); static DEFINE_RWLOCK(ematch_mod_lock); @@ -298,6 +297,11 @@ int tcf_em_tree_validate(struct tcf_proto *tp, struct rtattr *rta, struct tcf_ematch_tree_hdr *tree_hdr; struct tcf_ematch *em; + if (!rta) { + memset(tree, 0, sizeof(*tree)); + return 0; + } + if (rtattr_parse_nested(tb, TCA_EMATCH_TREE_MAX, rta) < 0) goto errout;