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 '27726d8c' and is currently only used by scsi hostdev.
Showing
想要评论请 注册 或 登录