https://bugzilla.redhat.com/show_bug.cgi?id=1447169
Again, no special here.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/libvirt_private.syms | 1 +
src/qemu/qemu_driver.c | 11 ++++++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index f30a04b14..247d1175b 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -539,6 +539,7 @@ virDomainVirtTypeFromString;
virDomainVirtTypeToString;
virDomainWatchdogActionTypeFromString;
virDomainWatchdogActionTypeToString;
+virDomainWatchdogDefFree;
virDomainWatchdogModelTypeFromString;
virDomainWatchdogModelTypeToString;
virDomainXMLOptionGetNamespace;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 583908972..85b4be360 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -8155,10 +8155,19 @@ qemuDomainDetachDeviceConfig(virDomainDefPtr vmdef,
break;
+ case VIR_DOMAIN_DEVICE_WATCHDOG:
+ if (!vmdef->watchdog) {
+ virReportError(VIR_ERR_OPERATION_FAILED, "%s",
+ _("domain has no watchdog"));
+ return -1;
+ }
+ virDomainWatchdogDefFree(vmdef->watchdog);
+ vmdef->watchdog = NULL;
+ break;
+
case VIR_DOMAIN_DEVICE_INPUT:
case VIR_DOMAIN_DEVICE_SOUND:
case VIR_DOMAIN_DEVICE_VIDEO:
- case VIR_DOMAIN_DEVICE_WATCHDOG:
case VIR_DOMAIN_DEVICE_GRAPHICS:
case VIR_DOMAIN_DEVICE_HUB:
case VIR_DOMAIN_DEVICE_SMARTCARD:
--
2.13.5