net/hinic: fix queues resource free
authorXiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Thu, 14 May 2020 09:29:16 +0000 (17:29 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 18 May 2020 18:35:57 +0000 (20:35 +0200)
commita2177d2e84c32fafb23f5863ef16ef1bf082d18f
tree594494dcabd3e316139a45ad346b474e24464013
parenteb49f1671f30ede5121373e633c529b75993a6b2
net/hinic: fix queues resource free

Adds tx_queues and rx_queues non-null judgment before free tx or
rx resources, because some app may set tx_queues or rx_queues to
be null before call free resource interfaces, which may cause
a segfault.

Fixes: 64727024d2fd ("net/hinic: add device initialization")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
drivers/net/hinic/hinic_pmd_rx.c
drivers/net/hinic/hinic_pmd_tx.c