aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/ematch.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/ematch.c')
-rw-r--r--net/sched/ematch.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/sched/ematch.c b/net/sched/ematch.c
index 5cb956b721e8..0fd0768a17c6 100644
--- a/net/sched/ematch.c
+++ b/net/sched/ematch.c
@@ -81,7 +81,6 @@
81 * open up a beer to watch the compilation going. 81 * open up a beer to watch the compilation going.
82 */ 82 */
83 83
84#include <linux/config.h>
85#include <linux/module.h> 84#include <linux/module.h>
86#include <linux/types.h> 85#include <linux/types.h>
87#include <linux/kernel.h> 86#include <linux/kernel.h>
@@ -322,10 +321,9 @@ int tcf_em_tree_validate(struct tcf_proto *tp, struct rtattr *rta,
322 list_len = RTA_PAYLOAD(rt_list); 321 list_len = RTA_PAYLOAD(rt_list);
323 matches_len = tree_hdr->nmatches * sizeof(*em); 322 matches_len = tree_hdr->nmatches * sizeof(*em);
324 323
325 tree->matches = kmalloc(matches_len, GFP_KERNEL); 324 tree->matches = kzalloc(matches_len, GFP_KERNEL);
326 if (tree->matches == NULL) 325 if (tree->matches == NULL)
327 goto errout; 326 goto errout;
328 memset(tree->matches, 0, matches_len);
329 327
330 /* We do not use rtattr_parse_nested here because the maximum 328 /* We do not use rtattr_parse_nested here because the maximum
331 * number of attributes is unknown. This saves us the allocation 329 * number of attributes is unknown. This saves us the allocation