qemu: Use VIR_AUTOPTR in qemuDomainSnapshotCreateDiskActive

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2019-06-03 17:45:43 +02:00
parent ef6b88deef
commit 0f9a2a665b

View File

@ -15235,7 +15235,7 @@ qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver,
qemuDomainAsyncJob asyncJob)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
virJSONValuePtr actions = NULL;
VIR_AUTOPTR(virJSONValue) actions = NULL;
bool do_transaction = false;
int ret = 0;
size_t i;
@ -15341,7 +15341,6 @@ qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver,
cleanup:
qemuDomainSnapshotDiskDataFree(diskdata, snapdef->ndisks, driver, vm);
virJSONValueFree(actions);
if (orig_err) {
virSetError(orig_err);