diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index e611634e087cdbd0c1d48d2ae066e05620d64b3d..ae0b733afd8162fbf572b806b0b6476e4e13b4b5 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -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;