aboutsummaryrefslogtreecommitdiff
path: root/net/tipc
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/name_table.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c
index 9dfc9127acd..d8473eefcd2 100644
--- a/net/tipc/name_table.c
+++ b/net/tipc/name_table.c
@@ -1052,12 +1052,11 @@ int tipc_nametbl_init(void)
{
int array_size = sizeof(struct hlist_head) * tipc_nametbl_size;
- table.types = kmalloc(array_size, GFP_ATOMIC);
+ table.types = kzalloc(array_size, GFP_ATOMIC);
if (!table.types)
return -ENOMEM;
write_lock_bh(&tipc_nametbl_lock);
- memset(table.types, 0, array_size);
table.local_publ_count = 0;
write_unlock_bh(&tipc_nametbl_lock);
return 0;