]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Add extra checks for secret destroy API's
authorJohn Ferlan <jferlan@redhat.com>
Tue, 10 May 2016 18:26:44 +0000 (14:26 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 10 May 2016 19:48:08 +0000 (15:48 -0400)
commitfc5c1e7fe92c08f3e57cef49d224f8b5ca3a8cc4
tree0322cf536664ace99cc3a4779119543b7a7b77f1
parentf21017ab7e55fbd01b0a83bc649a872612da10b4
qemu: Add extra checks for secret destroy API's

Remove the possibility that a NULL hostdev->privateData or a
disk->privateData could crash libvirtd by checking for NULL
before dereferencing for the secinfo structure in the
qemuDomainSecret{Disk|Hostdev}Destroy functions. The hostdevPriv
could be NULL if qemuProcessNetworkPrepareDevices adds a new
hostdev during virDomainNetGetActualHostdev that then gets
inserted via virDomainHostdevInsert. The hostdevPriv was added
by commit id '27726d8' and is currently only used by scsi hostdev.
src/qemu/qemu_domain.c