]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/tipc/netlink_compat.c
Merge tag 'drm-next-2020-02-07' of git://anongit.freedesktop.org/drm/drm
[linux.git] / net / tipc / netlink_compat.c
index 0254bb7e418bebe772bf46c7ccd997cf95528cb1..217516357ef26223a309be055cb8f6bbc7a78007 100644 (file)
@@ -204,8 +204,8 @@ static int __tipc_nl_compat_dumpit(struct tipc_nl_compat_cmd_dump *cmd,
                return -ENOMEM;
        }
 
-       attrbuf = kmalloc_array(tipc_genl_family.maxattr + 1,
-                               sizeof(struct nlattr *), GFP_KERNEL);
+       attrbuf = kcalloc(tipc_genl_family.maxattr + 1,
+                         sizeof(struct nlattr *), GFP_KERNEL);
        if (!attrbuf) {
                err = -ENOMEM;
                goto err_out;