Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75307c0f authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller
Browse files

ipv6: use kcalloc



Th fib_table_hash is an array, so use kcalloc.

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a76d7345
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -1481,8 +1481,8 @@ static int fib6_net_init(struct net *net)
	if (!net->ipv6.rt6_stats)
	if (!net->ipv6.rt6_stats)
		goto out_timer;
		goto out_timer;


	net->ipv6.fib_table_hash =
	net->ipv6.fib_table_hash = kcalloc(FIB_TABLE_HASHSZ,
		kzalloc(sizeof(*net->ipv6.fib_table_hash)*FIB_TABLE_HASHSZ,
					   sizeof(*net->ipv6.fib_table_hash),
					   GFP_KERNEL);
					   GFP_KERNEL);
	if (!net->ipv6.fib_table_hash)
	if (!net->ipv6.fib_table_hash)
		goto out_rt6_stats;
		goto out_rt6_stats;