提交 6ca568e2 编写于 作者: J Ján Tomko

qemuBuildCommandLine: use VIR_RETURN_PTR for cmd

Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 18d779c8
......@@ -10363,7 +10363,7 @@ qemuBuildCommandLine(virQEMUDriverPtr driver,
{
size_t i;
char uuid[VIR_UUID_STRING_BUFLEN];
virCommandPtr cmd = NULL;
VIR_AUTOPTR(virCommand) cmd = NULL;
VIR_AUTOUNREF(virQEMUDriverConfigPtr) cfg = virQEMUDriverGetConfig(driver);
unsigned int bootHostdevNet = 0;
qemuDomainObjPrivatePtr priv = vm->privateData;
......@@ -10619,10 +10619,9 @@ qemuBuildCommandLine(virQEMUDriverPtr driver,
cfg->logTimestamp)
virCommandAddArgList(cmd, "-msg", "timestamp=on", NULL);
return cmd;
VIR_RETURN_PTR(cmd);
error:
virCommandFree(cmd);
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册