]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/netfilter/ipvs/ip_vs_conn.c
treewide: Use array_size() in vmalloc()
[linux.git] / net / netfilter / ipvs / ip_vs_conn.c
index 61c3a389da89bcec22bc31858893bd0ba8cf4255..99e0aa350dc54c5735aedf8da1212c088224d1ee 100644 (file)
@@ -1380,7 +1380,8 @@ int __init ip_vs_conn_init(void)
        /*
         * Allocate the connection hash table and initialize its list heads
         */
-       ip_vs_conn_tab = vmalloc(ip_vs_conn_tab_size * sizeof(*ip_vs_conn_tab));
+       ip_vs_conn_tab = vmalloc(array_size(ip_vs_conn_tab_size,
+                                           sizeof(*ip_vs_conn_tab)));
        if (!ip_vs_conn_tab)
                return -ENOMEM;