Skip to content

Commit

Permalink
[NETFILTER]: xt_tcpudp: fix double unregistration in error path
Browse files Browse the repository at this point in the history
"xt_unregister_match(AF_INET, &tcp_matchstruct)" is called twice,
leaving "udp_matchstruct" registered, in case of a failure in the
registration of the udp6 structure.

Signed-off-by: Yuri Gushin <yuri@ecl-labs.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Yuri Gushin authored and David S. Miller committed Jun 29, 2006
1 parent 40a839f commit 9abdcf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/xt_tcpudp.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ static int __init xt_tcpudp_init(void)
return ret;

out_unreg_udp:
xt_unregister_match(&tcp_matchstruct);
xt_unregister_match(&udp_matchstruct);
out_unreg_tcp6:
xt_unregister_match(&tcp6_matchstruct);
out_unreg_tcp:
Expand Down

0 comments on commit 9abdcf6

Please sign in to comment.