]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/netfilter/x_tables.c
netfilter: x_tables: suppress kmemcheck warning
[mirror_ubuntu-artful-kernel.git] / net / netfilter / x_tables.c
index e0aa7c1d0224154db4ef09c752b88ca5e52bc404..fc4977456c30e098197b4f987b758072c9cf60d9 100644 (file)
@@ -1513,7 +1513,7 @@ xt_hook_ops_alloc(const struct xt_table *table, nf_hookfn *fn)
        if (!num_hooks)
                return ERR_PTR(-EINVAL);
 
-       ops = kmalloc(sizeof(*ops) * num_hooks, GFP_KERNEL);
+       ops = kcalloc(num_hooks, sizeof(*ops), GFP_KERNEL);
        if (ops == NULL)
                return ERR_PTR(-ENOMEM);