diff options
Diffstat (limited to 'net/ipv4/fib_semantics.c')
-rw-r--r-- | net/ipv4/fib_semantics.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index 5f87533684d5..63864bb846e2 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c | |||
@@ -709,11 +709,10 @@ fib_create_info(const struct rtmsg *r, struct kern_rta *rta, | |||
709 | goto failure; | 709 | goto failure; |
710 | } | 710 | } |
711 | 711 | ||
712 | fi = kmalloc(sizeof(*fi)+nhs*sizeof(struct fib_nh), GFP_KERNEL); | 712 | fi = kzalloc(sizeof(*fi)+nhs*sizeof(struct fib_nh), GFP_KERNEL); |
713 | if (fi == NULL) | 713 | if (fi == NULL) |
714 | goto failure; | 714 | goto failure; |
715 | fib_info_cnt++; | 715 | fib_info_cnt++; |
716 | memset(fi, 0, sizeof(*fi)+nhs*sizeof(struct fib_nh)); | ||
717 | 716 | ||
718 | fi->fib_protocol = r->rtm_protocol; | 717 | fi->fib_protocol = r->rtm_protocol; |
719 | 718 | ||