Skip to content

Commit

Permalink
[IPV4]: Fix order in inet_init failure path.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
okirch authored and David S. Miller committed Sep 29, 2006
1 parent f0e82fd commit 321efff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv4/af_inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 321efff

Please sign in to comment.