diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 6cfbb0df57cbce9f663bb90063d6996249faee1b..28eecec1aa1ea89bc5cc741b379eee92d74c6efc 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;