net/bnxt: fix null dereference in session cleanup
authorWeiguo Li <liwg06@foxmail.com>
Thu, 24 Feb 2022 15:53:59 +0000 (23:53 +0800)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Mon, 7 Mar 2022 05:13:05 +0000 (06:13 +0100)
commita2dfcd1ff609f5a4fd3b65774618a35c5c9f73c6
treecb395eee8e15f52dbed74cd2f62432e8022ec6ea
parent272f94e58b01a904b5d8cf66649512b0d62f1a8c
net/bnxt: fix null dereference in session cleanup

In tf_session_create(), there is a case that with 'tfp->session' still
be NULL and run 'goto cleanup', which will leads to a null dereference
by 'tfp_free(tfp->session->core_data)' in the cleanup.

Fixes: a46bbb57605b ("net/bnxt: update multi device design")
Cc: stable@dpdk.org
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/tf_core/tf_session.c