
From: "Daniel P. Berrange" <berrange@redhat.com> 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 loose the new data being defined. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> --- src/lxc/lxc_process.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 6cfbb0d..28eecec 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -1199,6 +1199,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; -- 1.7.11.2