[libvirt] [PATCH 06/10] qemu: Check valid activeDev before calling pciDeviceSetUsedBy
Peter Krempa
pkrempa at redhat.com
Thu Jan 17 20:31:35 UTC 2013
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
More information about the libvir-list
mailing list