diff options
Diffstat (limited to 'device-hotplug.c')
-rw-r--r-- | device-hotplug.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/device-hotplug.c b/device-hotplug.c index e6a1ffb9fa..9e38cc4808 100644 --- a/device-hotplug.c +++ b/device-hotplug.c @@ -24,6 +24,7 @@ #include "hw/hw.h" #include "hw/boards.h" +#include "sysemu/block-backend.h" #include "sysemu/blockdev.h" #include "qemu/config-file.h" #include "sysemu/sysemu.h" @@ -76,6 +77,6 @@ void drive_hot_add(Monitor *mon, const QDict *qdict) err: if (dinfo) { - drive_del(dinfo); + blk_unref(blk_by_legacy_dinfo(dinfo)); } } |