[patch 2/3] Fix subscript typo when calling hypervisor domainDestroy

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

 



Fixes:

  xen_unified.c: In function 'xenUnifiedDomainDestroy':
  xen_unified.c:697: error: array subscript is above array bounds

Signed-off-by: Mark McLoughlin <markmc@xxxxxxxxxx>

Index: libvirt/src/xen_unified.c
===================================================================
--- libvirt.orig/src/xen_unified.c
+++ libvirt/src/xen_unified.c
@@ -694,7 +694,7 @@ xenUnifiedDomainDestroy (virDomainPtr do
             drivers[i]->domainDestroy (dom) == 0)
             return 0;
 
-    if (priv->opened[i] &&
+    if (priv->opened[XEN_UNIFIED_HYPERVISOR_OFFSET] &&
         drivers[XEN_UNIFIED_HYPERVISOR_OFFSET]->domainDestroy &&
         drivers[XEN_UNIFIED_HYPERVISOR_OFFSET]->domainDestroy (dom) == 0)
         return 0;

-- 

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