X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fdecnet%2Fdn_fib.c;h=bd4ce8681a1271efe57cc82de17f036017ea20f7;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=fa20e2efcfc1b76aa86697c16b66871edf382706;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c index fa20e2efc..bd4ce8681 100644 --- a/net/decnet/dn_fib.c +++ b/net/decnet/dn_fib.c @@ -17,6 +17,7 @@ * this code was copied from it. * */ +#include #include #include #include @@ -283,10 +284,11 @@ struct dn_fib_info *dn_fib_create_info(const struct rtmsg *r, struct dn_kern_rta goto err_inval; } - fi = kzalloc(sizeof(*fi)+nhs*sizeof(struct dn_fib_nh), GFP_KERNEL); + fi = kmalloc(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;