Blame SOURCES/0010-FAPI-Fix-memory-leak-after-ifapi_init_primary_finish.patch

6a14f3
From 5652a33144973bdf570bea033ec185f8a7a6d038 Mon Sep 17 00:00:00 2001
6a14f3
From: JerryDevis <JerryDevis@users.noreply.github.com>
6a14f3
Date: Tue, 21 Dec 2021 17:44:00 +0800
6a14f3
Subject: [PATCH 10/23] FAPI: Fix memory leak after ifapi_init_primary_finish
6a14f3
 failed
6a14f3
6a14f3
Signed-off-by: JerryDevis <JerryDevis@users.noreply.github.com>
6a14f3
---
6a14f3
 src/tss2-fapi/fapi_util.c | 4 ++++
6a14f3
 1 file changed, 4 insertions(+)
6a14f3
6a14f3
diff --git a/src/tss2-fapi/fapi_util.c b/src/tss2-fapi/fapi_util.c
6a14f3
index 90f8b2aa..cd4e0979 100644
6a14f3
--- a/src/tss2-fapi/fapi_util.c
6a14f3
+++ b/src/tss2-fapi/fapi_util.c
6a14f3
@@ -807,6 +807,10 @@ ifapi_init_primary_finish(FAPI_CONTEXT *context, TSS2_KEY_TYPE ktype, IFAPI_OBJE
6a14f3
     }
6a14f3
 
6a14f3
 error_cleanup:
6a14f3
+    SAFE_FREE(outPublic);
6a14f3
+    SAFE_FREE(creationData);
6a14f3
+    SAFE_FREE(creationHash);
6a14f3
+    SAFE_FREE(creationTicket);
6a14f3
     ifapi_cleanup_ifapi_object(&context->createPrimary.pkey_object);
6a14f3
     free_string_list(k_sub_path);
6a14f3
     SAFE_FREE(pkey->serialization.buffer);
6a14f3
-- 
6a14f3
2.34.3
6a14f3