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

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