From: Jie Liu <[email protected]> sxe2_security_uinit() frees the security session but leaves dev->security_ctx pointing at the freed memory. Set dev->security_ctx to NULL after releasing the security context so a later access does not dereference a dangling pointer.
Cc: [email protected] Signed-off-by: Jie Liu <[email protected]> --- drivers/net/sxe2/sxe2_security.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/sxe2/sxe2_security.c b/drivers/net/sxe2/sxe2_security.c index bc59d1b880..8f31067942 100644 --- a/drivers/net/sxe2/sxe2_security.c +++ b/drivers/net/sxe2/sxe2_security.c @@ -326,6 +326,7 @@ void sxe2_security_uinit(struct rte_eth_dev *dev) if (sctx != NULL) { rte_free(sctx); sctx = NULL; + dev->security_ctx = NULL; } sxe2_ipsec_uinit(adapter); -- 2.52.0

