Skip to content

Commit

Permalink
FAPI: Fix session cleanup.
Browse files Browse the repository at this point in the history
The session cleanup in error cases tried to flush a password session.
Fixes: #2735

Signed-off-by: Juergen Repp <juergen_repp@web.de>
  • Loading branch information
JuergenReppSIT committed Jan 11, 2024
1 parent e67c89f commit b9050ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tss2-fapi/fapi_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@ ifapi_session_clean(FAPI_CONTEXT *context)
if (context->policy_session && context->policy_session != ESYS_TR_NONE) {
Esys_FlushContext(context->esys, context->policy_session);
}
if (context->session1 != ESYS_TR_NONE) {
if (context->session1 != ESYS_TR_NONE && context->session1 != ESYS_TR_PASSWORD) {
if (context->session1 == context->session2) {
context->session2 = ESYS_TR_NONE;
}
Expand Down

0 comments on commit b9050ef

Please sign in to comment.