hash: fix check of parameter
authorYunjian Wang <wangyunjian@huawei.com>
Tue, 27 Oct 2020 12:51:25 +0000 (20:51 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 29 Oct 2020 15:45:17 +0000 (16:45 +0100)
commiteb7fa475f7c568feb0ab1559232994504b73bb2c
tree9fe83a115049baa36a0f5b71a4b1320b019b2b4d
parent39e2961a0938fe80c943e6188765f3792dce9dfb
hash: fix check of parameter

Coverity flags that 'h' variable is used before
it's checked for NULL. This patch fixes this issue.

Coverity issue: 363625
Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
lib/librte_hash/rte_cuckoo_hash.c