From: Yuri Gushin Date: Tue, 27 Jun 2006 10:01:03 +0000 (-0700) Subject: [NETFILTER]: xt_tcpudp: fix double unregistration in error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9abdcf6b6cf387035d934c77bf9ebe5e747166f9;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [NETFILTER]: xt_tcpudp: fix double unregistration in error path "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 Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/netfilter/xt_tcpudp.c b/net/netfilter/xt_tcpudp.c index 1b61dac9c873..a9a63aa68936 100644 --- a/net/netfilter/xt_tcpudp.c +++ b/net/netfilter/xt_tcpudp.c @@ -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: