Signed-off-by: Wang Rui <moon.wangrui(a)huawei.com>
---
src/qemu/qemu_driver.c | 9 ---------
src/qemu/qemu_hotplug.c | 5 -----
2 files changed, 14 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index be37c8f..3406385 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1864,7 +1864,6 @@ static int qemuDomainResume(virDomainPtr dom)
virObjectEventPtr event = NULL;
int state;
virQEMUDriverConfigPtr cfg = NULL;
- virCapsPtr caps = NULL;
if (!(vm = qemuDomObjFromDomain(dom)))
return -1;
@@ -1901,8 +1900,6 @@ static int qemuDomainResume(virDomainPtr dom)
VIR_DOMAIN_EVENT_RESUMED,
VIR_DOMAIN_EVENT_RESUMED_UNPAUSED);
}
- if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
- goto endjob;
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
goto endjob;
ret = 0;
@@ -1916,7 +1913,6 @@ static int qemuDomainResume(virDomainPtr dom)
virObjectUnlock(vm);
if (event)
qemuDomainEventQueue(driver, event);
- virObjectUnref(caps);
virObjectUnref(cfg);
return ret;
}
@@ -7108,7 +7104,6 @@ qemuDomainChangeDiskMediaLive(virConnectPtr conn,
{
virDomainDiskDefPtr disk = dev->data.disk;
virDomainDiskDefPtr orig_disk = NULL;
- virCapsPtr caps = NULL;
int ret = -1;
if (virStorageTranslateDiskSourcePool(conn, disk) < 0)
@@ -7129,9 +7124,6 @@ qemuDomainChangeDiskMediaLive(virConnectPtr conn,
goto end;
}
- if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
- goto end;
-
/* Add the new disk src into shared disk hash table */
if (qemuAddSharedDevice(driver, dev, vm->def->name) < 0)
goto end;
@@ -7154,7 +7146,6 @@ qemuDomainChangeDiskMediaLive(virConnectPtr conn,
}
end:
- virObjectUnref(caps);
return ret;
}
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 0d97b57..9530451 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -758,7 +758,6 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
{
virDomainDiskDefPtr disk = dev->data.disk;
virDomainDiskDefPtr orig_disk = NULL;
- virCapsPtr caps = NULL;
int ret = -1;
const char *driverName = virDomainDiskGetDriver(disk);
const char *src = virDomainDiskGetSource(disk);
@@ -796,9 +795,6 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
goto end;
}
- if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
- goto end;
-
if (qemuDomainChangeEjectableMedia(driver, conn, vm, orig_disk,
disk->src, false) < 0)
goto end;
@@ -837,7 +833,6 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
end:
if (ret != 0)
ignore_value(qemuRemoveSharedDevice(driver, dev, vm->def->name));
- virObjectUnref(caps);
return ret;
}
--
1.7.12.4