commit | f65886606c2d3b562716de030706dfe1bea4ed5e | [log] [tgz] |
---|---|---|
author | Rustam Kovhaev <[email protected]> | Mon Sep 07 11:55:35 2020 -0700 |
committer | Paolo Bonzini <[email protected]> | Fri Sep 11 13:15:11 2020 -0400 |
tree | 4b6113de58850a3427ee5d31f80d9fb8ce228e7a | |
parent | 0f990222108d214a0924d920e6095b58107d7b59 [diff] |
KVM: fix memory leak in kvm_io_bus_unregister_dev() when kmalloc() fails in kvm_io_bus_unregister_dev(), before removing the bus, we should iterate over all other devices linked to it and call kvm_iodevice_destructor() for them Fixes: 90db10434b16 ("KVM: kvm_io_bus_unregister_dev() should never fail") Cc: [email protected] Reported-and-tested-by: [email protected] Link: https://syzkaller.appspot.com/bug?extid=f196caa45793d6374707 Signed-off-by: Rustam Kovhaev <[email protected]> Reviewed-by: Vitaly Kuznetsov <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>