Re: [PATCH 06/10] qemu: Check valid activeDev before calling pciDeviceSetUsedBy

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

 



On 01/17/13 20:17, John Ferlan wrote:
---
  src/qemu/qemu_hostdev.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c
index 896ad9b..ba6dadd 100644
--- a/src/qemu/qemu_hostdev.c
+++ b/src/qemu/qemu_hostdev.c
@@ -511,7 +511,8 @@ int qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
          dev = pciDeviceListGet(pcidevs, i);
          activeDev = pciDeviceListFind(driver->activePciHostdevs, dev);

-        pciDeviceSetUsedBy(activeDev, name);
+        if (activeDev)
+            pciDeviceSetUsedBy(activeDev, name);

Strange that no-one complained about this. This is either a false positive or nobody used that yet :)

ACK

Peter

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