]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/decnet/dn_fib.c
[NET]: Conversions from kmalloc+memset to k(z|c)alloc.
[mirror_ubuntu-bionic-kernel.git] / net / decnet / dn_fib.c
index 0375077391b7a39111e839dba86b6b5e4d48dbf5..fa20e2efcfc1b76aa86697c16b66871edf382706 100644 (file)
@@ -283,11 +283,10 @@ struct dn_fib_info *dn_fib_create_info(const struct rtmsg *r, struct dn_kern_rta
                        goto err_inval;
        }
 
-       fi = kmalloc(sizeof(*fi)+nhs*sizeof(struct dn_fib_nh), GFP_KERNEL);
+       fi = kzalloc(sizeof(*fi)+nhs*sizeof(struct dn_fib_nh), GFP_KERNEL);
        err = -ENOBUFS;
        if (fi == NULL)
                goto failure;
-       memset(fi, 0, sizeof(*fi)+nhs*sizeof(struct dn_fib_nh));
 
        fi->fib_protocol = r->rtm_protocol;
        fi->fib_nhs = nhs;