Skip to contentSkip to conversation

Fix order in inet_init failure path.

PATCH Applied Olaf Kirch 2 participants 2 messages Sep 26, 2006 – Sep 27, 2006

Subsystems (2)
lore
Share & tools
lore

Olaf Kirch

author
#0 lore raw

PATCH 1/1 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.

 net/ipv4/af_inet.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
net/ipv4/af_inet.c +2 -2
Index: build/net/ipv4/af_inet.c
===================================================================
@@ -1345,10 +1345,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;
 }
 
Signature · 2 lines
Olaf Kirch   |  --- o --- Nous sommes du soleil we love when we play
[email protected] |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax
maintainer Applied
#1 lore raw

From: Olaf Kirch <[email protected]>
Date: Tue, 26 Sep 2006 16:17:09 +0200

Quoted 5 lines

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.

Applied, thanks Olaf.