[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>
This commit is contained in:
committed by
David S. Miller
parent
a0ee7c70b2
commit
0da974f4f3
@@ -773,10 +773,9 @@ static int em_meta_change(struct tcf_proto *tp, void *data, int len,
|
||||
TCF_META_ID(hdr->right.kind) > TCF_META_ID_MAX)
|
||||
goto errout;
|
||||
|
||||
meta = kmalloc(sizeof(*meta), GFP_KERNEL);
|
||||
meta = kzalloc(sizeof(*meta), GFP_KERNEL);
|
||||
if (meta == NULL)
|
||||
goto errout;
|
||||
memset(meta, 0, sizeof(*meta));
|
||||
|
||||
memcpy(&meta->lvalue.hdr, &hdr->left, sizeof(hdr->left));
|
||||
memcpy(&meta->rvalue.hdr, &hdr->right, sizeof(hdr->right));
|
||||
|
Reference in New Issue
Block a user