diff options
| author | 2020-12-14 23:40:15 +0000 | |
|---|---|---|
| committer | 2020-12-16 11:02:10 +0100 | |
| commit | 161b838e25c6f83495e27e3f546b893622d442bf (patch) | |
| tree | 25822c88c579457de7dab4678a2cf8f0ae620e42 /tools/testing/selftests/exec/git:/ssh:/git@git.zx2c4.com | |
| parent | Merge tag 'staging-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging (diff) | |
| download | linux-dev-161b838e25c6f83495e27e3f546b893622d442bf.tar.xz linux-dev-161b838e25c6f83495e27e3f546b893622d442bf.zip | |
netfilter: nftables: fix incorrect increment of loop counter
The intention of the err_expr cleanup path is to iterate over the
allocated expr_array objects and free them, starting from i - 1 and
working down to the start of the array. Currently the loop counter
is being incremented instead of decremented and also the index i is
being used instead of k, repeatedly destroying the same expr_array
element. Fix this by decrementing k and using k as the index into
expr_array.
Addresses-Coverity: ("Infinite loop")
Fixes: 8cfd9b0f8515 ("netfilter: nftables: generalize set expressions support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tools/testing/selftests/exec/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
