]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/af_inet6.c
[IPV6]: Fix inet6_init missing unregister.
[linux-2.6-omap-h63xx.git] / net / ipv6 / af_inet6.c
index 4f8795af2edb68d950d909952f583ff0e3be8005..c63b8ce0e1b5fe646fee384f9508f2f14f45154a 100644 (file)
@@ -699,12 +699,14 @@ static int __init inet6_init(void)
        /* Register the family here so that the init calls below will
         * be able to create sockets. (?? is this dangerous ??)
         */
-       (void) sock_register(&inet6_family_ops);
+       err = sock_register(&inet6_family_ops);
+       if (err)
+               goto out_unregister_raw_proto;
 
        /* Initialise ipv6 mibs */
        err = init_ipv6_mibs();
        if (err)
-               goto out_unregister_raw_proto;
+               goto out_unregister_sock;
        
        /*
         *      ipngwg API draft makes clear that the correct semantics
@@ -796,6 +798,8 @@ icmp_fail:
        ipv6_sysctl_unregister();
 #endif
        cleanup_ipv6_mibs();
+out_unregister_sock:
+       sock_unregister(PF_INET6);
 out_unregister_raw_proto:
        proto_unregister(&rawv6_prot);
 out_unregister_udp_proto: