diff options
Diffstat (limited to 'device-hotplug.c')
-rw-r--r-- | device-hotplug.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/device-hotplug.c b/device-hotplug.c index 3e5cdaad10..126f73c676 100644 --- a/device-hotplug.c +++ b/device-hotplug.c @@ -84,6 +84,8 @@ void hmp_drive_add(Monitor *mon, const QDict *qdict) err: if (dinfo) { - blk_unref(blk_by_legacy_dinfo(dinfo)); + BlockBackend *blk = blk_by_legacy_dinfo(dinfo); + monitor_remove_blk(blk); + blk_unref(blk); } } |