aboutsummaryrefslogtreecommitdiff
path: root/device-hotplug.c
diff options
context:
space:
mode:
Diffstat (limited to 'device-hotplug.c')
-rw-r--r--device-hotplug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/device-hotplug.c b/device-hotplug.c
index eecb08e..e6a1ffb 100644
--- a/device-hotplug.c
+++ b/device-hotplug.c
@@ -40,7 +40,7 @@ DriveInfo *add_init_drive(const char *optstr)
return NULL;
mc = MACHINE_GET_CLASS(current_machine);
- dinfo = drive_init(opts, mc->block_default_type);
+ dinfo = drive_new(opts, mc->block_default_type);
if (!dinfo) {
qemu_opts_del(opts);
return NULL;
@@ -76,6 +76,6 @@ void drive_hot_add(Monitor *mon, const QDict *qdict)
err:
if (dinfo) {
- drive_put_ref(dinfo);
+ drive_del(dinfo);
}
}