The paths have the domain ID in them. Without cleaning them, they would
contain the same ID even after multiple restarts. That could cause
various problems, e.g. with access.
Add function qemuDomainClearPrivatePaths() for this as a counterpart of
qemuDomainSetPrivatePaths().
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
}
+void
+qemuDomainClearPrivatePaths(virDomainObjPtr vm)
+{
+ qemuDomainObjPrivatePtr priv = vm->privateData;
+
+ VIR_FREE(priv->libDir);
+ VIR_FREE(priv->channelTargetDir);
+}
+
+
static void *
qemuDomainObjPrivateAlloc(void)
{
int qemuDomainSetPrivatePaths(virQEMUDriverPtr driver,
virDomainObjPtr vm);
+void qemuDomainClearPrivatePaths(virDomainObjPtr vm);
virDomainDiskDefPtr qemuDomainDiskByName(virDomainDefPtr def, const char *name);
virFileDeleteTree(priv->libDir);
virFileDeleteTree(priv->channelTargetDir);
+ qemuDomainClearPrivatePaths(vm);
+
ignore_value(virDomainChrDefForeach(vm->def,
false,
qemuProcessCleanupChardevDevice,