提交 dd35c8da 编写于 作者: D Daniel P. Berrange 提交者: Cole Robinson

Ensure transient def is removed if LXC start fails

When starting a container, newDef is initialized to a
copy of 'def', but when startup fails newDef is never
removed. This cause later attempts to use 'virDomainDefine'
to lose the new data being defined.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 9d2bfc1c)
上级 f928284b
......@@ -1184,6 +1184,10 @@ cleanup:
VIR_FREE(veths[i]);
}
if (rc != 0) {
if (vm->newDef) {
virDomainDefFree(vm->newDef);
vm->newDef = NULL;
}
if (priv->monitor) {
virObjectUnref(priv->monitor);
priv->monitor = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册