提交 c3ce8367 编写于 作者: P Peter Krempa

qemu: tpm: Use g_autofree in qemuTPMEmulatorGetPid

Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 1900936f
......@@ -277,15 +277,13 @@ qemuTPMEmulatorGetPid(const char *swtpmStateDir,
{
int ret;
g_autofree char *swtpm = virTPMGetSwtpm();
char *pidfile = qemuTPMEmulatorCreatePidFilename(swtpmStateDir,
shortName);
g_autofree char *pidfile = qemuTPMEmulatorCreatePidFilename(swtpmStateDir,
shortName);
if (!pidfile)
return -ENOMEM;
ret = virPidFileReadPathIfAlive(pidfile, pid, swtpm);
VIR_FREE(pidfile);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册