diff options
Diffstat (limited to 'net/decnet/dn_fib.c')
-rw-r--r-- | net/decnet/dn_fib.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c index 0375077391b7..fa20e2efcfc1 100644 --- a/net/decnet/dn_fib.c +++ b/net/decnet/dn_fib.c | |||
@@ -283,11 +283,10 @@ struct dn_fib_info *dn_fib_create_info(const struct rtmsg *r, struct dn_kern_rta | |||
283 | goto err_inval; | 283 | goto err_inval; |
284 | } | 284 | } |
285 | 285 | ||
286 | fi = kmalloc(sizeof(*fi)+nhs*sizeof(struct dn_fib_nh), GFP_KERNEL); | 286 | fi = kzalloc(sizeof(*fi)+nhs*sizeof(struct dn_fib_nh), GFP_KERNEL); |
287 | err = -ENOBUFS; | 287 | err = -ENOBUFS; |
288 | if (fi == NULL) | 288 | if (fi == NULL) |
289 | goto failure; | 289 | goto failure; |
290 | memset(fi, 0, sizeof(*fi)+nhs*sizeof(struct dn_fib_nh)); | ||
291 | 290 | ||
292 | fi->fib_protocol = r->rtm_protocol; | 291 | fi->fib_protocol = r->rtm_protocol; |
293 | fi->fib_nhs = nhs; | 292 | fi->fib_nhs = nhs; |