net/hinic: fix negative array index read
authorYunjian Wang <wangyunjian@huawei.com>
Mon, 24 Aug 2020 12:43:46 +0000 (20:43 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:06 +0000 (18:55 +0200)
commit2e8fb3d2442cc0123562d4c43a6e86a1bb3df62f
tree16884668a88e29e49ab87db177a6b178b59ee42f
parentba2fb4f022fc29b838a64778e520c32ea724ccdc
net/hinic: fix negative array index read

Negative array index read using variable 'i' as an index to array
'filter_info->pkt_filters'. Fixed by add return value check.

Coverity issue: 350364
Fixes: f4ca3fd54c4d ("net/hinic: create and destroy flow director filter")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/hinic/hinic_pmd_flow.c