|
|
897056 |
From e1b4d9fd5b796711b38475c381a168a99003163c Mon Sep 17 00:00:00 2001
|
|
|
897056 |
From: Juergen Repp <juergen.repp@sit.fraunhofer.de>
|
|
|
897056 |
Date: Thu, 2 Dec 2021 09:17:15 +0100
|
|
|
897056 |
Subject: [PATCH 09/23] FAPI: Fix leak in fapi crypto with ossl3
|
|
|
897056 |
|
|
|
897056 |
A leak in the case "out of memory" detected by scan-build was fixed.
|
|
|
897056 |
|
|
|
897056 |
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de>
|
|
|
897056 |
---
|
|
|
897056 |
src/tss2-fapi/fapi_crypto.c | 2 +-
|
|
|
897056 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
897056 |
|
|
|
897056 |
diff --git a/src/tss2-fapi/fapi_crypto.c b/src/tss2-fapi/fapi_crypto.c
|
|
|
897056 |
index d061cf48..fd7ea555 100644
|
|
|
897056 |
--- a/src/tss2-fapi/fapi_crypto.c
|
|
|
897056 |
+++ b/src/tss2-fapi/fapi_crypto.c
|
|
|
897056 |
@@ -1573,7 +1573,7 @@ ifapi_crypto_hash_start(IFAPI_CRYPTO_CONTEXT_BLOB **context,
|
|
|
897056 |
* As we don't want the TPM to be called for these operations, we have
|
|
|
897056 |
* to initialize own library context with the default provider. */
|
|
|
897056 |
mycontext->libctx = OSSL_LIB_CTX_new();
|
|
|
897056 |
- return_if_null(mycontext->libctx, "Out of memory", TSS2_FAPI_RC_MEMORY);
|
|
|
897056 |
+ goto_if_null(mycontext->libctx, "Out of memory", TSS2_FAPI_RC_MEMORY, cleanup);
|
|
|
897056 |
|
|
|
897056 |
if (!(mycontext->osslHashAlgorithm =
|
|
|
897056 |
EVP_MD_fetch(mycontext->libctx, get_hash_md(hashAlgorithm), NULL))) {
|
|
|
897056 |
--
|
|
|
897056 |
2.34.3
|
|
|
897056 |
|