Skip to content

Commit

Permalink
test fapi-get-esys-blobs: missing FlushContext
Browse files Browse the repository at this point in the history
In case of error in Esys_Sign, esys_handle needs to be
flushed before jumping to 'error' part

Signed-off-by: lcharpentier-stm <laurent.charpentier@st.com>
  • Loading branch information
lcharpentier-stm authored and AndreasFuchsTPM committed Nov 30, 2023
1 parent fcff6da commit bf29bc1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/integration/fapi-get-esys-blobs.int.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,12 @@ test_fapi_get_esys_blobs(FAPI_CONTEXT *context)
&inScheme,
&hash_validation,
&signature);
goto_if_error(r, "Error: Sign", error);

if (r != TSS2_RC_SUCCESS) {
LOG_ERROR("%s " TPM2_ERROR_FORMAT, "Error: Sign", TPM2_ERROR_TEXT(r));
Esys_FlushContext(context->esys, esys_handle);
goto error;
}

SAFE_FREE(signature);

Expand Down

0 comments on commit bf29bc1

Please sign in to comment.