From: John Ferlan Date: Mon, 2 May 2016 17:31:47 +0000 (-0400) Subject: qemu: Move qemuDomainSecretDestroy to qemuProcessLaunch X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8ac3b74ad274e5925dadd48cd5fd79aadd6fae4e;p=libvirt.git 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 --- diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index ba6c93f267..54d32cc343 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -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)