]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuDomainDetachDeviceLiveAndConfig: Don't use driver->caps directly
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 23 May 2018 13:06:11 +0000 (15:06 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 28 May 2018 11:08:50 +0000 (13:08 +0200)
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>
src/qemu/qemu_driver.c

index 4a8059ebd1bd6bc99ff0ce284e198a746dc3d2dc..25924d2032a37920927974886680ab6fdf055ddb 100644 (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;