]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Move setting of obj bools for qemuDomainAttachVirtioDiskDevice
authorJohn Ferlan <jferlan@redhat.com>
Tue, 19 Jul 2016 14:48:10 +0000 (10:48 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 20 Jul 2016 09:56:35 +0000 (05:56 -0400)
A post push realization that the setting of the boolean needed to be
inside the if condition.

src/qemu/qemu_hotplug.c

index 5e18d344a8d8db4e0c56f01dc7ee10a128e03a20..aee62bb4e0e02a82ef19147a2a77998be47abfd7 100644 (file)
@@ -382,8 +382,8 @@ qemuDomainAttachVirtioDiskDevice(virConnectPtr conn,
         secobjProps = NULL; /* qemuMonitorAddObject consumes */
         if (rv < 0)
             goto exit_monitor;
+        secobjAdded = true;
     }
-    secobjAdded = true;
 
     if (encobjProps) {
         rv = qemuMonitorAddObject(priv->mon, "secret", encinfo->s.aes.alias,
@@ -391,8 +391,8 @@ qemuDomainAttachVirtioDiskDevice(virConnectPtr conn,
         encobjProps = NULL; /* qemuMonitorAddObject consumes */
         if (rv < 0)
             goto exit_monitor;
+        encobjAdded = true;
     }
-    encobjAdded = true;
 
     if (qemuMonitorAddDrive(priv->mon, drivestr) < 0)
         goto exit_monitor;