diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index e0a5300f08fafb699fa2217caa4126d78007ba55..49af4d4ff0ba4917797ef89b01fb0289905a47bc 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2212,6 +2212,10 @@ qemuDomainAttachMemory(virQEMUDriverPtr driver, ignore_value(qemuMonitorDelObject(priv->mon, objalias)); if (qemuDomainObjExitMonitor(driver, vm) < 0) mem = NULL; + + if (objAdded && mem) + ignore_value(qemuProcessDestroyMemoryBackingPath(driver, vm, mem)); + virErrorRestore(&orig_err); if (!mem) goto audit;