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

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