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

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



Fixes:

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

Signed-off-by: Mark McLoughlin <markmc redhat com>

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;

-- 


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