]> err.no Git - linux-2.6/commitdiff
[IPV4]: Fix order in inet_init failure path.
authorOlaf Kirch <okir@suse.de>
Wed, 27 Sep 2006 23:33:45 +0000 (16:33 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 29 Sep 2006 01:01:48 +0000 (18:01 -0700)
This is just a minor buglet I came across by accident - when inet_init
fails to register raw_prot, it jumps to out_unregister_udp_proto which
should unregister UDP _and_ TCP.

Signed-off-by: Olaf Kirch <okir@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/af_inet.c

index 250a02b23e4e1627db6e0720eca619db471454b6..ea58448326830359b8d6416e990698d459dbd2d8 100644 (file)
@@ -1342,10 +1342,10 @@ static int __init inet_init(void)
        rc = 0;
 out:
        return rc;
-out_unregister_tcp_proto:
-       proto_unregister(&tcp_prot);
 out_unregister_udp_proto:
        proto_unregister(&udp_prot);
+out_unregister_tcp_proto:
+       proto_unregister(&tcp_prot);
        goto out;
 }