diff options
Diffstat (limited to 'net/sched/em_meta.c')
-rw-r--r-- | net/sched/em_meta.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index 698372954f4d..61e3b740ab1a 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c | |||
@@ -773,10 +773,9 @@ static int em_meta_change(struct tcf_proto *tp, void *data, int len, | |||
773 | TCF_META_ID(hdr->right.kind) > TCF_META_ID_MAX) | 773 | TCF_META_ID(hdr->right.kind) > TCF_META_ID_MAX) |
774 | goto errout; | 774 | goto errout; |
775 | 775 | ||
776 | meta = kmalloc(sizeof(*meta), GFP_KERNEL); | 776 | meta = kzalloc(sizeof(*meta), GFP_KERNEL); |
777 | if (meta == NULL) | 777 | if (meta == NULL) |
778 | goto errout; | 778 | goto errout; |
779 | memset(meta, 0, sizeof(*meta)); | ||
780 | 779 | ||
781 | memcpy(&meta->lvalue.hdr, &hdr->left, sizeof(hdr->left)); | 780 | memcpy(&meta->lvalue.hdr, &hdr->left, sizeof(hdr->left)); |
782 | memcpy(&meta->rvalue.hdr, &hdr->right, sizeof(hdr->right)); | 781 | memcpy(&meta->rvalue.hdr, &hdr->right, sizeof(hdr->right)); |