Skip to content

Commit 75307c0

Browse files
Stephen Hemmingerdavem330
authored andcommitted
ipv6: use kcalloc
Th fib_table_hash is an array, so use kcalloc. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a76d734 commit 75307c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

net/ipv6/ip6_fib.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,9 +1481,9 @@ static int fib6_net_init(struct net *net)
14811481
if (!net->ipv6.rt6_stats)
14821482
goto out_timer;
14831483

1484-
net->ipv6.fib_table_hash =
1485-
kzalloc(sizeof(*net->ipv6.fib_table_hash)*FIB_TABLE_HASHSZ,
1486-
GFP_KERNEL);
1484+
net->ipv6.fib_table_hash = kcalloc(FIB_TABLE_HASHSZ,
1485+
sizeof(*net->ipv6.fib_table_hash),
1486+
GFP_KERNEL);
14871487
if (!net->ipv6.fib_table_hash)
14881488
goto out_rt6_stats;
14891489

0 commit comments

Comments
 (0)