瀏覽代碼

[IPV4]: Fix order in inet_init failure path.

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>
Olaf Kirch 18 年之前
父節點
當前提交
321efff7c3
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      net/ipv4/af_inet.c

+ 2 - 2
net/ipv4/af_inet.c

@@ -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;
 }