提交 b8358f94 编写于 作者: S Stefan Berger 提交者: Eric Blake

tpm: Fix memory leak and use existing variable instead

Use the existing variables rather then calling virTPMSwtpmXYZ().
Signed-off-by: NStefan Berger <stefanb@linux.ibm.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
Message-Id: <20190726205633.2041912-2-stefanb@linux.vnet.ibm.com>
上级 e1ff8a95
......@@ -512,7 +512,7 @@ qemuTPMEmulatorRunSetup(const char *storagepath,
VIR_TPM_SWTPM_SETUP_FEATURE_CMDARG_PWDFILE_FD)) {
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
_("%s does not support passing a passphrase using a file "
"descriptor"), virTPMGetSwtpmSetup());
"descriptor"), swtpm_setup);
goto cleanup;
}
if ((pwdfile_fd = qemuTPMSetupEncryption(secretuuid, cmd)) < 0)
......@@ -652,7 +652,7 @@ qemuTPMEmulatorBuildCommand(virDomainTPMDefPtr tpm,
if (!virTPMSwtpmCapsGet(VIR_TPM_SWTPM_FEATURE_CMDARG_PWD_FD)) {
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
_("%s does not support passing passphrase via file descriptor"),
virTPMGetSwtpm());
swtpm);
goto error;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册