]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Move qemuDomainSecretDestroy to qemuProcessLaunch
authorJohn Ferlan <jferlan@redhat.com>
Mon, 2 May 2016 17:31:47 +0000 (13:31 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 5 May 2016 18:47:51 +0000 (14:47 -0400)
Rather than need to call qemuDomainSecretDestroy after any call to
qemuProcessLaunch, let's do the destroy in qemuProcessLaunch since
that's where command line is eventually generated and processed. Once
it's generated, we can clear out the secrets.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_process.c

index ba6c93f26724163974e0da2810d7b007ef15e407..54d32cc3430392e0265947c666f8fed39d60a621 100644 (file)
@@ -5608,6 +5608,7 @@ qemuProcessLaunch(virConnectPtr conn,
     ret = 0;
 
  cleanup:
+    qemuDomainSecretDestroy(vm);
     virCommandFree(cmd);
     qemuDomainLogContextFree(logCtxt);
     virObjectUnref(cfg);
@@ -5720,8 +5721,6 @@ qemuProcessStart(virConnectPtr conn,
     }
     relabel = true;
 
-    qemuDomainSecretDestroy(vm);
-
     if (incoming &&
         incoming->deferredURI &&
         qemuMigrationRunIncoming(driver, vm, incoming->deferredURI, asyncJob) < 0)