From: Daniel Berrange <berrange(a)redhat.com>
---
src/xen/xm_internal.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c
index 153c7a5..c080e91 100644
--- a/src/xen/xm_internal.c
+++ b/src/xen/xm_internal.c
@@ -3056,6 +3056,7 @@ xenXMDomainDetachDeviceFlags(virDomainPtr domain, const char *xml,
def->disks + i + 1,
sizeof(*def->disks) *
(def->ndisks - (i + 1)));
+ def->ndisks--;
break;
}
}
@@ -3074,6 +3075,7 @@ xenXMDomainDetachDeviceFlags(virDomainPtr domain, const char *xml,
def->nets + i + 1,
sizeof(*def->nets) *
(def->nnets - (i + 1)));
+ def->nnets--;
break;
}
}
--
1.7.2