diff options
author | Panagiotis Issaris <takis@issaris.org> | 2006-07-21 17:51:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-07-21 17:51:30 -0400 |
commit | 0da974f4f303a6842516b764507e3c0a03f41e5a (patch) | |
tree | 8872aec792f02040269c6769dd1009b20f71d186 /net/sched/ematch.c | |
parent | a0ee7c70b22f78593957f99faa06acb4747b8bc0 (diff) |
[NET]: Conversions from kmalloc+memset to k(z|c)alloc.
Signed-off-by: Panagiotis Issaris <takis@issaris.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/ematch.c')
-rw-r--r-- | net/sched/ematch.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sched/ematch.c b/net/sched/ematch.c index 2405a86093a2..0fd0768a17c6 100644 --- a/net/sched/ematch.c +++ b/net/sched/ematch.c | |||
@@ -321,10 +321,9 @@ int tcf_em_tree_validate(struct tcf_proto *tp, struct rtattr *rta, | |||
321 | list_len = RTA_PAYLOAD(rt_list); | 321 | list_len = RTA_PAYLOAD(rt_list); |
322 | matches_len = tree_hdr->nmatches * sizeof(*em); | 322 | matches_len = tree_hdr->nmatches * sizeof(*em); |
323 | 323 | ||
324 | tree->matches = kmalloc(matches_len, GFP_KERNEL); | 324 | tree->matches = kzalloc(matches_len, GFP_KERNEL); |
325 | if (tree->matches == NULL) | 325 | if (tree->matches == NULL) |
326 | goto errout; | 326 | goto errout; |
327 | memset(tree->matches, 0, matches_len); | ||
328 | 327 | ||
329 | /* We do not use rtattr_parse_nested here because the maximum | 328 | /* We do not use rtattr_parse_nested here because the maximum |
330 | * number of attributes is unknown. This saves us the allocation | 329 | * number of attributes is unknown. This saves us the allocation |