]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix a crash when restarting libvirtd.
authorChris Lalancette <clalance@redhat.com>
Mon, 25 Jan 2010 16:13:41 +0000 (11:13 -0500)
committerChris Lalancette <clalance@redhat.com>
Mon, 25 Jan 2010 21:25:47 +0000 (16:25 -0500)
commit7cc5410bfd78f67300fe0344658e66df6482aa25
tree35f9f7d3592e198bf03c942a200d65ab5d596a64
parenta7d17c6187e2245c692ad07c1fee001a926dab78
Fix a crash when restarting libvirtd.

If you shutdown libvirtd while a domain with PCI
devices is running, then try to restart libvirtd,
libvirtd will crash.

This happens because qemuUpdateActivePciHostdevs() is calling
pciDeviceListSteal() with a dev of 0x0 (NULL), and then trying
to dereference it.  This patch fixes it up so that
qemuUpdateActivePciHostdevs() steals the devices after first
Get()'ting them, avoiding the crash.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
src/qemu/qemu_driver.c