net/txgbe: fix null pointer check
authorHongbo Zheng <zhenghongbo3@huawei.com>
Sun, 25 Apr 2021 12:54:29 +0000 (20:54 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 29 Apr 2021 13:10:35 +0000 (15:10 +0200)
commitcf30a78593cc8d5644a576a03477f3bf10feba67
tree7f61df8f15f3c0197ec71a3a049fdd1d590af60d
parent230d4940ed8e4fc0138fab2fdb2087553b8465dd
net/txgbe: fix null pointer check

In function cons_parse_ntuple_filter, item->spec and item->mask
should be confirmed not null before use memcmp on it, current
judgement (item->spec || item->mask) just can confirm item->spec
or item->mask is not null, and cause null pointer be used in
memcmp.

This patch fix this problem.

Fixes: b7eeecb17556 ("net/txgbe: parse n-tuple filter")
Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Jiawen Wu <jiawenwu@trustnetic.com>
drivers/net/txgbe/txgbe_flow.c