[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
@ -909,11 +909,10 @@ static int __init inet_diag_init(void)
|
||||
sizeof(struct inet_diag_handler *));
|
||||
int err = -ENOMEM;
|
||||
|
||||
inet_diag_table = kmalloc(inet_diag_table_size, GFP_KERNEL);
|
||||
inet_diag_table = kzalloc(inet_diag_table_size, GFP_KERNEL);
|
||||
if (!inet_diag_table)
|
||||
goto out;
|
||||
|
||||
memset(inet_diag_table, 0, inet_diag_table_size);
|
||||
idiagnl = netlink_kernel_create(NETLINK_INET_DIAG, 0, inet_diag_rcv,
|
||||
THIS_MODULE);
|
||||
if (idiagnl == NULL)
|
||||
|
Reference in New Issue
Block a user