From bf29bc102c8d327bb09ff3ef2be8ee4de55277b0 Mon Sep 17 00:00:00 2001 From: lcharpentier-stm Date: Thu, 30 Nov 2023 14:08:38 +0100 Subject: [PATCH] test fapi-get-esys-blobs: missing FlushContext In case of error in Esys_Sign, esys_handle needs to be flushed before jumping to 'error' part Signed-off-by: lcharpentier-stm --- test/integration/fapi-get-esys-blobs.int.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/integration/fapi-get-esys-blobs.int.c b/test/integration/fapi-get-esys-blobs.int.c index b1eb4ddde..77903f8c6 100644 --- a/test/integration/fapi-get-esys-blobs.int.c +++ b/test/integration/fapi-get-esys-blobs.int.c @@ -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);