summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Berger2018-01-26 19:49:24 +0100
committerStefan Berger2018-01-29 18:24:51 +0100
commit302705876492a39f568035ce346e2c9176f5665e (patch)
tree475769e9910fef9b1d347a224eaed4c42ca929a7
parentMerge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into st... (diff)
downloadqemu-302705876492a39f568035ce346e2c9176f5665e.tar.gz
qemu-302705876492a39f568035ce346e2c9176f5665e.tar.xz
qemu-302705876492a39f568035ce346e2c9176f5665e.zip
tpm: Set the flags of the CMD_INIT command to 0
The flags of the CMD_INIT control channel command were not initialized properly. Fix this and set to 0. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-rw-r--r--hw/tpm/tpm_emulator.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/tpm/tpm_emulator.c b/hw/tpm/tpm_emulator.c
index 35c78de5a9..532d3e3c52 100644
--- a/hw/tpm/tpm_emulator.c
+++ b/hw/tpm/tpm_emulator.c
@@ -320,7 +320,9 @@ static int tpm_emulator_set_buffer_size(TPMBackend *tb,
static int tpm_emulator_startup_tpm(TPMBackend *tb, size_t buffersize)
{
TPMEmulator *tpm_emu = TPM_EMULATOR(tb);
- ptm_init init;
+ ptm_init init = {
+ .u.req.init_flags = 0,
+ };
ptm_res res;
if (buffersize != 0 &&