diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index ce70c2576bb2..e9d16619f718 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -1173,11 +1173,10 @@ struct xt_table_info *xt_alloc_table_info(unsigned int size) if (sz < sizeof(*info) || sz >= XT_MAX_TABLE_SIZE) return NULL; - info = kvmalloc(sz, GFP_KERNEL_ACCOUNT); + info = kvzalloc(sz, GFP_KERNEL_ACCOUNT); if (!info) return NULL; - memset(info, 0, sizeof(*info)); info->size = size; return info; }