qemu: Move qemuDomainSecretDestroy to qemuProcessLaunch

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>
This commit is contained in:
John Ferlan 2016-05-02 13:31:47 -04:00
parent 3619be4971
commit 8ac3b74ad2

View 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)