From 0138bd8cb09d4023ae24fd5fa53ed15b954c62c1 Mon Sep 17 00:00:00 2001 From: Corey Minyard Date: Thu, 3 Oct 2024 17:39:16 -0500 Subject: [PATCH] lanserv: Check that authdata is initialized before cleanup Otherwise the cleanup will crash. Signed-off-by: Corey Minyard --- lanserv/lanserv_ipmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lanserv/lanserv_ipmi.c b/lanserv/lanserv_ipmi.c index 657866e6..1d37b8a3 100644 --- a/lanserv/lanserv_ipmi.c +++ b/lanserv/lanserv_ipmi.c @@ -140,7 +140,7 @@ close_session(lanserv_data_t *lan, session_t *session) } session->active = 0; - if (session->authtype <= 4) + if (session->authtype <= 4 && session->authdata) ipmi_auths[session->authtype].authcode_cleanup(session->authdata); if (session->integh) session->integh->cleanup(lan, session);