diff options
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r-- | net/ipv6/addrconf.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index a68c626567f2..9c2e94f1c637 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -261,9 +261,15 @@ static int snmp6_alloc_dev(struct inet6_dev *idev) | |||
261 | sizeof(struct icmpv6_mib), | 261 | sizeof(struct icmpv6_mib), |
262 | __alignof__(struct icmpv6_mib)) < 0) | 262 | __alignof__(struct icmpv6_mib)) < 0) |
263 | goto err_icmp; | 263 | goto err_icmp; |
264 | if (snmp_mib_init((void **)idev->stats.icmpv6msg, | ||
265 | sizeof(struct icmpv6msg_mib), | ||
266 | __alignof__(struct icmpv6msg_mib)) < 0) | ||
267 | goto err_icmpmsg; | ||
264 | 268 | ||
265 | return 0; | 269 | return 0; |
266 | 270 | ||
271 | err_icmpmsg: | ||
272 | snmp_mib_free((void **)idev->stats.icmpv6); | ||
267 | err_icmp: | 273 | err_icmp: |
268 | snmp_mib_free((void **)idev->stats.ipv6); | 274 | snmp_mib_free((void **)idev->stats.ipv6); |
269 | err_ip: | 275 | err_ip: |
@@ -272,6 +278,7 @@ err_ip: | |||
272 | 278 | ||
273 | static int snmp6_free_dev(struct inet6_dev *idev) | 279 | static int snmp6_free_dev(struct inet6_dev *idev) |
274 | { | 280 | { |
281 | snmp_mib_free((void **)idev->stats.icmpv6msg); | ||
275 | snmp_mib_free((void **)idev->stats.icmpv6); | 282 | snmp_mib_free((void **)idev->stats.icmpv6); |
276 | snmp_mib_free((void **)idev->stats.ipv6); | 283 | snmp_mib_free((void **)idev->stats.ipv6); |
277 | return 0; | 284 | return 0; |