From: Pablo Neira Ayuso Date: Thu, 10 Jan 2013 11:42:15 +0000 (+0100) Subject: netfilter: xt_CT: fix unset return value if conntrack zone are disabled X-Git-Tag: v3.7.6~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8aec109e2abc91dee186d2b11eb550b763ae2791;p=karo-tx-linux.git netfilter: xt_CT: fix unset return value if conntrack zone are disabled commit 4610476d89d53714ca94aae081fa035908bc137a upstream. net/netfilter/xt_CT.c: In function ‘xt_ct_tg_check_v1’: net/netfilter/xt_CT.c:250:6: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized] net/netfilter/xt_CT.c: In function ‘xt_ct_tg_check_v0’: net/netfilter/xt_CT.c:112:6: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized] Reported-by: Borislav Petkov Acked-by: Borislav Petkov Signed-off-by: Pablo Neira Ayuso Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c index aeeaf5c38b53..8461605a3c15 100644 --- a/net/netfilter/xt_CT.c +++ b/net/netfilter/xt_CT.c @@ -109,7 +109,7 @@ static int xt_ct_tg_check_v0(const struct xt_tgchk_param *par) struct xt_ct_target_info *info = par->targinfo; struct nf_conntrack_tuple t; struct nf_conn *ct; - int ret; + int ret = -EOPNOTSUPP; if (info->flags & ~XT_CT_NOTRACK) return -EINVAL; @@ -243,7 +243,7 @@ static int xt_ct_tg_check_v1(const struct xt_tgchk_param *par) struct xt_ct_target_info_v1 *info = par->targinfo; struct nf_conntrack_tuple t; struct nf_conn *ct; - int ret; + int ret = -EOPNOTSUPP; if (info->flags & ~XT_CT_NOTRACK) return -EINVAL;