mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-07 12:17:18 +00:00
1c7c759f5b
There are few places where a virPCIDeviceAddress typed variable is allocated on the stack but it's not initialized. This can lead to random values of its members which in turn can lead to a random behaviour. Generated with help of the following spatch: @@ identifier I; @@ - virPCIDeviceAddress I; + virPCIDeviceAddress I = { 0 }; And then fixing bhyveAssignDevicePCISlots() which does declare the variable and then explicitly zero it by calling memset() only to set a specific member afterwards. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>