]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ipv6: fix ip6_mr_init error path
authorBenjamin Thery <benjamin.thery@bull.net>
Tue, 11 Nov 2008 00:34:11 +0000 (16:34 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 11 Nov 2008 00:34:11 +0000 (16:34 -0800)
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>
net/ipv6/ip6mr.c

index 182f8a177e7f1acc6cfce06c36b1fe64ed4f6ccc..52a7eb0e2c2c0e8fb65b2136828c0f827da7b360 100644 (file)
@@ -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;
 }