Skip to content

Commit

Permalink
lanserv: Check that authdata is initialized before cleanup
Browse files Browse the repository at this point in the history
Otherwise the cleanup will crash.

Signed-off-by: Corey Minyard <[email protected]>
  • Loading branch information
cminyard committed Oct 3, 2024
1 parent c114912 commit 0138bd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lanserv/lanserv_ipmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0138bd8

Please sign in to comment.