Blame SOURCES/0018-FAPI-Initialize-object-used-for-keystore-search.patch

897056
From cd9987b0e400f8a77a19c3b8279eb931554cce7c Mon Sep 17 00:00:00 2001
897056
From: Juergen Repp <juergen.repp@sit.fraunhofer.de>
897056
Date: Thu, 13 Jan 2022 11:46:22 +0100
897056
Subject: [PATCH 18/23] FAPI: Initialize object used for keystore search.
897056
897056
For an empty keystore a cleanup of an uninitialized object was executed. No the object
897056
type now is initialized with IFAPI_OBJ_NONE to prevent the cleanup.
897056
897056
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de>
897056
---
897056
 src/tss2-fapi/ifapi_keystore.c | 3 +++
897056
 1 file changed, 3 insertions(+)
897056
897056
diff --git a/src/tss2-fapi/ifapi_keystore.c b/src/tss2-fapi/ifapi_keystore.c
897056
index e805029f..c5486690 100644
897056
--- a/src/tss2-fapi/ifapi_keystore.c
897056
+++ b/src/tss2-fapi/ifapi_keystore.c
897056
@@ -1173,6 +1173,9 @@ keystore_search_obj(
897056
     IFAPI_OBJECT object;
897056
     size_t i;
897056
 
897056
+    /* Mark object "unread" */
897056
+    object.objectType = IFAPI_OBJ_NONE;
897056
+
897056
     switch (keystore->key_search.state) {
897056
     statecase(keystore->key_search.state, KSEARCH_INIT)
897056
         r = ifapi_keystore_list_all(keystore,
897056
-- 
897056
2.34.3
897056