diff options
author | Benjamin Thery <benjamin.thery@bull.net> | 2008-11-10 19:34:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-10 19:34:11 -0500 |
commit | 87b30a6530218cde431a659f2c118cb72175507c (patch) | |
tree | 792683c82c1ddf7728698c68301cdaa67997bc8e /net/ipv6/ip6mr.c | |
parent | 1207e795568a368928dfd23d6817e47f2e8097e3 (diff) |
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.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 182f8a177e7f..52a7eb0e2c2c 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
@@ -981,14 +981,15 @@ int __init ip6_mr_init(void) | |||
981 | goto proc_cache_fail; | 981 | goto proc_cache_fail; |
982 | #endif | 982 | #endif |
983 | return 0; | 983 | return 0; |
984 | reg_notif_fail: | ||
985 | kmem_cache_destroy(mrt_cachep); | ||
986 | #ifdef CONFIG_PROC_FS | 984 | #ifdef CONFIG_PROC_FS |
987 | proc_vif_fail: | ||
988 | unregister_netdevice_notifier(&ip6_mr_notifier); | ||
989 | proc_cache_fail: | 985 | proc_cache_fail: |
990 | proc_net_remove(&init_net, "ip6_mr_vif"); | 986 | proc_net_remove(&init_net, "ip6_mr_vif"); |
987 | proc_vif_fail: | ||
988 | unregister_netdevice_notifier(&ip6_mr_notifier); | ||
991 | #endif | 989 | #endif |
990 | reg_notif_fail: | ||
991 | del_timer(&ipmr_expire_timer); | ||
992 | kmem_cache_destroy(mrt_cachep); | ||
992 | return err; | 993 | return err; |
993 | } | 994 | } |
994 | 995 | ||