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

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



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


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