tcgbios: Fix use of unitialized variable
Review-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
(cherry picked from commit 1ef72ab2f89ae61dcdb3f01323bd0a7dc978c2b9)
diff --git a/src/tcgbios.c b/src/tcgbios.c
index 4cff4ce..d62ab99 100644
--- a/src/tcgbios.c
+++ b/src/tcgbios.c
@@ -1269,7 +1269,6 @@
struct hleeo *hleeo)
{
u32 rc = 0;
- struct hleo hleo;
struct hleei_long *hleei_l = (struct hleei_long *)hleei_s;
const void *logdataptr;
u32 logdatalen;
@@ -1312,7 +1311,7 @@
hleeo->opblength = sizeof(struct hleeo);
hleeo->reserved = 0;
- hleeo->eventnumber = hleo.eventnumber;
+ hleeo->eventnumber = tpm_state.entry_count;
memcpy(hleeo->digest, pcpes->digest, sizeof(hleeo->digest));
err_exit: