crypto/octeontx: fix null pointer dereferencing
authorAnoob Joseph <anoob.joseph@caviumnetworks.com>
Mon, 12 Nov 2018 18:14:12 +0000 (18:14 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 14 Nov 2018 03:32:48 +0000 (04:32 +0100)
commitaccf8ca7b03de24b2b6818b9eda2bf73ce736372
treebfd9cf4c8c58db3cedd3338c549adb2cc1e16484
parentacbaf3cedcc783966f1187949a426996bb9072f1
crypto/octeontx: fix null pointer dereferencing

The function otx_cpt_get_resource() would be setting the pointer
'instance'. In case of error, 'instance' would be set to NULL, and
returns rte_errno. If rte_errno when 'instance' is set to NULL, it can
lead to NULL pointer dereferencing.

Coverity Issue: 323486, 323489
Fixes: bfe2ae495ee2 ("crypto/octeontx: add PMD skeleton")
Fixes: 0961348fdf52 ("crypto/octeontx: add queue pair functions")

Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
drivers/crypto/octeontx/otx_cryptodev.c
drivers/crypto/octeontx/otx_cryptodev_ops.c