qemuDomainDetachDeviceLiveAndConfig: Don't use driver->caps directly

Funny, we obtain driver caps at the beginning of the function,
but then for unknown reason access driver->caps directly.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Michal Privoznik committed 2018-05-28 13:08:50 +02:00
1 parent e73f6b4d66
commit 604f3ff0c0
1 file changed
+2 -2
+2 -2
View File
@@ -8724,7 +8724,7 @@ qemuDomainDetachDeviceLiveAndConfig(virQEMUDriverPtr driver,
* changed even if we failed to attach the device. For example,
* a new controller may be created.
*/
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) < 0) {
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, caps) < 0) {
ret = -1;
goto cleanup;
}
@@ -8732,7 +8732,7 @@ qemuDomainDetachDeviceLiveAndConfig(virQEMUDriverPtr driver,
/* Finally, if no error until here, we can save config. */
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
ret = virDomainSaveConfig(cfg->configDir, driver->caps, vmdef);
ret = virDomainSaveConfig(cfg->configDir, caps, vmdef);
if (!ret) {
virDomainObjAssignDef(vm, vmdef, false, NULL);
vmdef = NULL;