Skip to content

Commit 4610476

Browse files
committed
netfilter: xt_CT: fix unset return value if conntrack zone are disabled
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 <bp@alien8.de> Acked-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent a9b8a89 commit 4610476

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎net/netfilter/xt_CT.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static int xt_ct_tg_check_v0(const struct xt_tgchk_param *par)
109109
struct xt_ct_target_info *info = par->targinfo;
110110
struct nf_conntrack_tuple t;
111111
struct nf_conn *ct;
112-
int ret;
112+
int ret = -EOPNOTSUPP;
113113

114114
if (info->flags & ~XT_CT_NOTRACK)
115115
return -EINVAL;
@@ -247,7 +247,7 @@ static int xt_ct_tg_check_v1(const struct xt_tgchk_param *par)
247247
struct xt_ct_target_info_v1 *info = par->targinfo;
248248
struct nf_conntrack_tuple t;
249249
struct nf_conn *ct;
250-
int ret;
250+
int ret = -EOPNOTSUPP;
251251

252252
if (info->flags & ~XT_CT_NOTRACK)
253253
return -EINVAL;

0 commit comments

Comments
 (0)