diff options
author | Yajun Deng <yajun.deng@linux.dev> | 2021-08-30 17:16:40 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-30 12:47:09 +0100 |
commit | 1b9fbe813016b08e08b22ddba4ddbf9cb1b04b00 (patch) | |
tree | 0f631551e02b508d17c243b805bb7d0dac8e7aba /include/net | |
parent | aaa8e4922c887ff47ad66ef918193682bccc1905 (diff) | |
download | lwn-1b9fbe813016b08e08b22ddba4ddbf9cb1b04b00.tar.gz lwn-1b9fbe813016b08e08b22ddba4ddbf9cb1b04b00.zip |
net: ipv4: Fix the warning for dereference
Add a if statements to avoid the warning.
Dan Carpenter report:
The patch faf482ca196a: "net: ipv4: Move ip_options_fragment() out of
loop" from Aug 23, 2021, leads to the following Smatch complaint:
net/ipv4/ip_output.c:833 ip_do_fragment()
warn: variable dereferenced before check 'iter.frag' (see line 828)
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: faf482ca196a ("net: ipv4: Move ip_options_fragment() out of loop")
Link: https://lore.kernel.org/netdev/20210830073802.GR7722@kadam/T/#t
Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
0 files changed, 0 insertions, 0 deletions