[PATCH 2/5] xen: Fix device count on detach

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Daniel Berrange <berrange@xxxxxxxxxx>

---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]