X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fsched%2Fematch.c;h=0fd0768a17c6cc9ab5b627bbfd94bee9c03b9657;hb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;hp=5cb956b721e8e05a452262decdc114061cb0a0a0;hpb=4e76c8a9fa413ccc09d3f7f664183dcce3555d57;p=linux-2.6.git diff --git a/net/sched/ematch.c b/net/sched/ematch.c index 5cb956b72..0fd0768a1 100644 --- a/net/sched/ematch.c +++ b/net/sched/ematch.c @@ -81,7 +81,6 @@ * open up a beer to watch the compilation going. */ -#include #include #include #include @@ -322,10 +321,9 @@ int tcf_em_tree_validate(struct tcf_proto *tp, struct rtattr *rta, list_len = RTA_PAYLOAD(rt_list); matches_len = tree_hdr->nmatches * sizeof(*em); - tree->matches = kmalloc(matches_len, GFP_KERNEL); + tree->matches = kzalloc(matches_len, GFP_KERNEL); if (tree->matches == NULL) goto errout; - memset(tree->matches, 0, matches_len); /* We do not use rtattr_parse_nested here because the maximum * number of attributes is unknown. This saves us the allocation