summaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6mr.c
diff options
context:
space:
mode:
authorBenjamin Thery <benjamin.thery@bull.net>2008-11-10 16:34:11 -0800
committerDavid S. Miller <davem@davemloft.net>2008-11-10 16:34:11 -0800
commit87b30a6530218cde431a659f2c118cb72175507c (patch)
tree792683c82c1ddf7728698c68301cdaa67997bc8e /net/ipv6/ip6mr.c
parent1207e795568a368928dfd23d6817e47f2e8097e3 (diff)
downloadop-kernel-dev-87b30a6530218cde431a659f2c118cb72175507c.zip
op-kernel-dev-87b30a6530218cde431a659f2c118cb72175507c.tar.gz
ipv6: fix ip6_mr_init error path
The order of cleanup operations in the error/exit section of ip6_mr_init() is completely inversed. It should be the other way around. Also a del_timer() is missing in the error path. Signed-off-by: Benjamin Thery <benjamin.thery@bull.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6mr.c')
-rw-r--r--net/ipv6/ip6mr.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 182f8a1..52a7eb0 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -981,14 +981,15 @@ int __init ip6_mr_init(void)
goto proc_cache_fail;
#endif
return 0;
-reg_notif_fail:
- kmem_cache_destroy(mrt_cachep);
#ifdef CONFIG_PROC_FS
-proc_vif_fail:
- unregister_netdevice_notifier(&ip6_mr_notifier);
proc_cache_fail:
proc_net_remove(&init_net, "ip6_mr_vif");
+proc_vif_fail:
+ unregister_netdevice_notifier(&ip6_mr_notifier);
#endif
+reg_notif_fail:
+ del_timer(&ipmr_expire_timer);
+ kmem_cache_destroy(mrt_cachep);
return err;
}
OpenPOWER on IntegriCloud