If CONFIG_NF_CONNTRACK_ZONES is not defined, the variable ret might be
uninitialized when it goes to err1 through line 125 and 263 respectively.
So I change these goto err1 to return -EINVAL directly.
Signed-off-by: Cong Ding <redacted>
---
net/netfilter/xt_CT.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Waskiewicz Jr, Peter P <hidden> Date: 2013-01-15 19:06:58
On Tue, 2013-01-15 at 19:58 +0100, Cong Ding wrote:
quoted hunk
If CONFIG_NF_CONNTRACK_ZONES is not defined, the variable ret might be
uninitialized when it goes to err1 through line 125 and 263 respectively.
So I change these goto err1 to return -EINVAL directly.
Signed-off-by: Cong Ding <redacted>
---
net/netfilter/xt_CT.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
In dropping both goto's, you left the err1 label unused. Wouldn't just
initializing ret to -EINVAL be easier and cleaner? Then you wouldn't be
messing with the flow of the function.
-PJ
On Tue, Jan 15, 2013 at 07:06:51PM +0000, Waskiewicz Jr, Peter P wrote:
On Tue, 2013-01-15 at 19:58 +0100, Cong Ding wrote:
quoted
If CONFIG_NF_CONNTRACK_ZONES is not defined, the variable ret might be
uninitialized when it goes to err1 through line 125 and 263 respectively.
So I change these goto err1 to return -EINVAL directly.
Signed-off-by: Cong Ding <redacted>
---
net/netfilter/xt_CT.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
In dropping both goto's, you left the err1 label unused. Wouldn't just
initializing ret to -EINVAL be easier and cleaner? Then you wouldn't be
messing with the flow of the function.
The label err1 are also used in line 130 and 298. I change it to "return
-EINVAL" rather than initialize ret to -EINVAL is to keep it the same as line
115 and 253. Otherwise, we should change line 115 and 253 to be goto err1,
too?
- cong
From: Pablo Neira Ayuso <pablo@netfilter.org> Date: 2013-01-15 19:18:56
Hi Cong,
On Tue, Jan 15, 2013 at 07:58:34PM +0100, Cong Ding wrote:
If CONFIG_NF_CONNTRACK_ZONES is not defined, the variable ret might be
uninitialized when it goes to err1 through line 125 and 263 respectively.
So I change these goto err1 to return -EINVAL directly.