mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-30 12:31:16 +00:00
qemuDomainSaveImageStartVM: Use g_autoptr() for virCommand
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
1c16f261d0
commit
82e127e343
@ -6804,7 +6804,7 @@ qemuDomainSaveImageStartVM(virConnectPtr conn,
|
|||||||
bool restored = false;
|
bool restored = false;
|
||||||
virObjectEventPtr event;
|
virObjectEventPtr event;
|
||||||
VIR_AUTOCLOSE intermediatefd = -1;
|
VIR_AUTOCLOSE intermediatefd = -1;
|
||||||
virCommandPtr cmd = NULL;
|
g_autoptr(virCommand) cmd = NULL;
|
||||||
g_autofree char *errbuf = NULL;
|
g_autofree char *errbuf = NULL;
|
||||||
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
|
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
|
||||||
virQEMUSaveHeaderPtr header = &data->header;
|
virQEMUSaveHeaderPtr header = &data->header;
|
||||||
@ -6920,7 +6920,6 @@ qemuDomainSaveImageStartVM(virConnectPtr conn,
|
|||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(cookie);
|
virObjectUnref(cookie);
|
||||||
virCommandFree(cmd);
|
|
||||||
if (qemuSecurityRestoreSavedStateLabel(driver, vm, path) < 0)
|
if (qemuSecurityRestoreSavedStateLabel(driver, vm, path) < 0)
|
||||||
VIR_WARN("failed to restore save state label on %s", path);
|
VIR_WARN("failed to restore save state label on %s", path);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user